diff options
author | Haru <haru@dotalux.com> | 2016-10-01 00:16:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 00:16:21 +0200 |
commit | dd71362b10e5986e034ed86db08961926440ace0 (patch) | |
tree | 119c8d409657cee1d90cd0c072ef3b7e846fa3f0 /src/common/cbasetypes.h | |
parent | 84ecefb4db23bbd98194a43a592cfe313477a1ab (diff) | |
parent | 2000a698da35915afb1a598433337a735d27ae24 (diff) | |
download | hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.gz hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.bz2 hercules-dd71362b10e5986e034ed86db08961926440ace0.tar.xz hercules-dd71362b10e5986e034ed86db08961926440ace0.zip |
Merge pull request #1450 from 4144/gcc7fixes
Add different fixes for gcc 7 warnings.
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index d3db86543..33d617b13 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -298,6 +298,13 @@ typedef uintptr_t uintptr; #define PRAGMA_GCC45(str) #endif // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) +// fallthrough attribute only enabled on gcc >= 7.0 +#if defined(__GNUC__) && (GCC_VERSION >= 70000) +#define FALLTHROUGH __attribute__ ((fallthrough)); +#else // ! defined(__GNUC__) && (GCC_VERSION >= 70000) +#define FALLTHROUGH +#endif // ! defined(__GNUC__) && (GCC_VERSION >= 70000) + // boolean types for C #if !defined(_MSC_VER) || _MSC_VER >= 1800 // MSVC doesn't have stdbool.h yet as of Visual Studio 2012 (MSVC version 17.00) |