Explorar o código

Fix macro redefinition for GNUC compilers > 6

GNUC compilers greater than version 6 already have the macro __always_inline defined. This fix checks GNUC version before defining the macro itself.
patrickmt %!s(int64=6) %!d(string=hai) anos
pai
achega
118d5cc03f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tmk_core/protocol/arm_atsam/usb/compiler.h

+ 1 - 1
tmk_core/protocol/arm_atsam/usb/compiler.h

@@ -136,7 +136,7 @@
  */
 #if defined(__CC_ARM)
 #  define __always_inline             __forceinline
-#elif (defined __GNUC__)
+#elif (defined __GNUC__ && __GNUC__ <= 6)
 #  define __always_inline             __attribute__((__always_inline__))
 #elif (defined __ICCARM__)
 #  define __always_inline             _Pragma("inline=forced")