diff options
| author | James Churchill <pelrun@gmail.com> | 2019-01-11 18:30:20 +1000 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-01-11 17:25:57 -0800 |
| commit | 9c136e1168a1f6d0637f59164b6d9adb9ba0bdee (patch) | |
| tree | fd95ab1d3d2a042b90142d5fda5311df8353772e /tmk_core | |
| parent | 2c4109394fa9ee71b10b8b2d3d1473a409d7003e (diff) | |
| download | qmk_firmware-9c136e1168a1f6d0637f59164b6d9adb9ba0bdee.tar.gz qmk_firmware-9c136e1168a1f6d0637f59164b6d9adb9ba0bdee.zip | |
Improved fix for __always_inline redefinition bug
Instead of changing based on the version of GCC, check for the presence of the macro instead.
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol/arm_atsam/usb/compiler.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tmk_core/protocol/arm_atsam/usb/compiler.h b/tmk_core/protocol/arm_atsam/usb/compiler.h index 7d8350896..b2ccfd73e 100644 --- a/tmk_core/protocol/arm_atsam/usb/compiler.h +++ b/tmk_core/protocol/arm_atsam/usb/compiler.h | |||
| @@ -134,13 +134,15 @@ | |||
| 134 | * heuristics and inline the function no matter how big it thinks it | 134 | * heuristics and inline the function no matter how big it thinks it |
| 135 | * becomes. | 135 | * becomes. |
| 136 | */ | 136 | */ |
| 137 | #if !defined(__always_inline) | ||
| 137 | #if defined(__CC_ARM) | 138 | #if defined(__CC_ARM) |
| 138 | # define __always_inline __forceinline | 139 | # define __always_inline __forceinline |
| 139 | #elif (defined __GNUC__ && __GNUC__ <= 6) | 140 | #elif (defined __GNUC__) |
| 140 | # define __always_inline __attribute__((__always_inline__)) | 141 | # define __always_inline __attribute__((__always_inline__)) |
| 141 | #elif (defined __ICCARM__) | 142 | #elif (defined __ICCARM__) |
| 142 | # define __always_inline _Pragma("inline=forced") | 143 | # define __always_inline _Pragma("inline=forced") |
| 143 | #endif | 144 | #endif |
| 145 | #endif | ||
| 144 | 146 | ||
| 145 | /** | 147 | /** |
| 146 | * \def __no_inline | 148 | * \def __no_inline |
