]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix macro redefinition for GNUC compilers > 6
authorpatrickmt <40182064+patrickmt@users.noreply.github.com>
Fri, 14 Dec 2018 18:37:37 +0000 (13:37 -0500)
committerDrashna Jaelre <drashna@live.com>
Fri, 14 Dec 2018 20:47:17 +0000 (12:47 -0800)
GNUC compilers greater than version 6 already have the macro __always_inline defined. This fix checks GNUC version before defining the macro itself.

tmk_core/protocol/arm_atsam/usb/compiler.h

index d3384398673344dd3466f6c0723ed8cf7714d8af..7d8350896b54addea2f01620ddd75826a96f9dbe 100644 (file)
  */
 #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")