From 9002dc706711741b6db2c53de4e5b94b02322f37 Mon Sep 17 00:00:00 2001 From: Reimu NotMoe Date: Tue, 18 Apr 2023 17:27:42 +0800 Subject: [PATCH] Use __GNUC__ macro to determine if __has_attribute is supported --- src/common/tusb_compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h index dce32e92b..5ab56e145 100644 --- a/src/common/tusb_compiler.h +++ b/src/common/tusb_compiler.h @@ -138,7 +138,7 @@ #define TU_ATTR_BIT_FIELD_ORDER_BEGIN #define TU_ATTR_BIT_FIELD_ORDER_END - #if defined(__XC16) + #if __GNUC__ < 5 #define TU_ATTR_FALLTHROUGH do {} while (0) /* fallthrough */ #else #if __has_attribute(__fallthrough__)