diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-20 03:06:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-20 04:04:40 +0300 |
commit | 5e37f24550e133d985945bb008782df543e1f428 (patch) | |
tree | d32657fab845823be6a75bc743bdf6e8a357bcaa /src/localconsts.h | |
parent | d3c69c839b180e1d22d5a89625322dfc6ae72785 (diff) | |
download | manaverse-5e37f24550e133d985945bb008782df543e1f428.tar.gz manaverse-5e37f24550e133d985945bb008782df543e1f428.tar.bz2 manaverse-5e37f24550e133d985945bb008782df543e1f428.tar.xz manaverse-5e37f24550e133d985945bb008782df543e1f428.zip |
Fix sdl warning hiding pragmas for old compilers.
Diffstat (limited to 'src/localconsts.h')
-rw-r--r-- | src/localconsts.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index 539989371..ef667dfd9 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -210,6 +210,12 @@ #define A_FALLTHROUGH #endif // ADVGCC +#if GCC_VERSION >= 48000 +#define PRAGMA48(str) _Pragma(#str) +#else // GCC_VERSION > 48000 +#define PRAGMA48(str) +#endif // GCC_VERSION > 48000 + #if GCC_VERSION >= 49000 #define PRAGMA49(str) _Pragma(#str) #else // GCC_VERSION > 49000 @@ -326,10 +332,10 @@ PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #endif // USE_SDL2 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wshadow") +PRAGMA48(GCC diagnostic push) +PRAGMA48(GCC diagnostic ignored "-Wshadow") #include <SDL_version.h> -#pragma GCC diagnostic pop +PRAGMA48(GCC diagnostic pop) #ifdef USE_SDL2 PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 |