From 44e142d4f97863e669737707a1a22bf40ed49bbc Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 5 Jul 2022 16:52:43 +0000 Subject: [PATCH] cm3: scb: C11 keyword compliance Avoid use of the gnu specific "asm" keyword, and use the __asm__ keyword, as used everywhere else in the library. This fixes compilation in C11, and unifies all uses of asm literals in the codebase. Reported-by: @dragonmux Fixes: https://github.com/libopencm3/libopencm3/pull/1425 Signed-off-by: Karl Palsson --- include/libopencm3/cm3/scb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libopencm3/cm3/scb.h b/include/libopencm3/cm3/scb.h index aafe70c6..74ac623b 100644 --- a/include/libopencm3/cm3/scb.h +++ b/include/libopencm3/cm3/scb.h @@ -549,7 +549,7 @@ struct scb_exception_stack_frame { #define SCB_GET_EXCEPTION_STACK_FRAME(f) \ do { \ - asm volatile ("mov %[frameptr], sp" \ + __asm__ volatile ("mov %[frameptr], sp" \ : [frameptr]"=r" (f)); \ } while (0)