diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-09-25 20:52:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-10-17 03:30:39 +0300 |
commit | 1bc17b805aec9dff503afca1e4b7120c5c836b75 (patch) | |
tree | 650394991a8f5d924a936aa5c2e9cbaf2ed77c6b /src/common/cbasetypes.h | |
parent | 5b2f2fd6edbc13c2ba7ea777ceb205294899b72b (diff) | |
download | hercules-1bc17b805aec9dff503afca1e4b7120c5c836b75.tar.gz hercules-1bc17b805aec9dff503afca1e4b7120c5c836b75.tar.bz2 hercules-1bc17b805aec9dff503afca1e4b7120c5c836b75.tar.xz hercules-1bc17b805aec9dff503afca1e4b7120c5c836b75.zip |
Fix compilation warnings in gcc-9
Also reenabled array bound warning
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 89f7f8588..c9c189032 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -313,6 +313,13 @@ typedef uintptr_t uintptr; #define PRAGMA_GCC5(str) #endif // ! defined(__GNUC__) && (GCC_VERSION >= 50000) +// Pragma macro only enabled on gcc >= 9 +#if defined(__GNUC__) && (GCC_VERSION >= 90000) +#define PRAGMA_GCC9(str) _Pragma(#str) +#else // ! defined(__GNUC__) && (GCC_VERSION >= 90000) +#define PRAGMA_GCC9(str) +#endif // ! defined(__GNUC__) && (GCC_VERSION >= 90000) + // fallthrough attribute only enabled on gcc >= 7.0 #if defined(__GNUC__) && (GCC_VERSION >= 70000) #define FALLTHROUGH __attribute__ ((fallthrough)); |