From ac20605e3f098687ce40349bbecc9266333d951b Mon Sep 17 00:00:00 2001 From: Yunhao Tian Date: Tue, 30 Nov 2021 17:11:09 +0800 Subject: Ignore certain compiler options on ARMCC ARMCC also sets __GNU__ macro, but doesn't support GCC diagnostic pragmas. --- src/common/tusb_compiler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h index d3284c62a..38e6a16d0 100644 --- a/src/common/tusb_compiler.h +++ b/src/common/tusb_compiler.h @@ -137,9 +137,11 @@ #define TU_BSWAP16(u16) (__builtin_bswap16(u16)) #define TU_BSWAP32(u32) (__builtin_bswap32(u32)) + #ifndef __ARMCC_VERSION // List of obsolete callback function that is renamed and should not be defined. // Put it here since only gcc support this pragma - #pragma GCC poison tud_vendor_control_request_cb + #pragma GCC poison tud_vendor_control_request_cb + #endif #elif defined(__TI_COMPILER_VERSION__) #define TU_ATTR_ALIGNED(Bytes) __attribute__ ((aligned(Bytes))) -- cgit v1.3.1