diff options
Diffstat (limited to 'src/util/Compiler.h')
-rw-r--r-- | src/util/Compiler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/Compiler.h b/src/util/Compiler.h index 6a64ad098..a97b34529 100644 --- a/src/util/Compiler.h +++ b/src/util/Compiler.h @@ -143,6 +143,12 @@ #define gcc_flatten #endif +#if CLANG_OR_GCC_VERSION(7,0) +#define gcc_fallthrough __attribute__((fallthrough)) +#else +#define gcc_fallthrough +#endif + #ifndef __cplusplus /* plain C99 has "restrict" */ #define gcc_restrict restrict |