]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Improved fix for __always_inline redefinition bug
authorJames Churchill <pelrun@gmail.com>
Fri, 11 Jan 2019 08:30:20 +0000 (18:30 +1000)
committerDrashna Jaelre <drashna@live.com>
Sat, 12 Jan 2019 01:25:57 +0000 (17:25 -0800)
Instead of changing based on the version of GCC, check for the presence of the macro instead.

tmk_core/protocol/arm_atsam/usb/compiler.h

index 7d8350896b54addea2f01620ddd75826a96f9dbe..b2ccfd73edb555bba7b0e1e2acc0e4c1ab998771 100644 (file)
  * heuristics and inline the function no matter how big it thinks it
  * becomes.
  */
+#if !defined(__always_inline)
 #if defined(__CC_ARM)
 #  define __always_inline             __forceinline
-#elif (defined __GNUC__ && __GNUC__ <= 6)
+#elif (defined __GNUC__)
 #  define __always_inline             __attribute__((__always_inline__))
 #elif (defined __ICCARM__)
 #  define __always_inline             _Pragma("inline=forced")
 #endif
+#endif
 
 /**
  * \def __no_inline