diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/localconsts.h | 6 | ||||
-rw-r--r-- | src/utils/process.cpp | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index 881680c93..dc63ad87b 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -157,8 +157,14 @@ #ifdef __clang__ #define PRAGMACLANG(str) _Pragma(#str) +#if __clang_major__ >= 6 +#define PRAGMACLANG6(str) _Pragma(#str) +#else // __clang_major__ >= 6 +#define PRAGMACLANG6(str) +#endif // __clang_major__ >= 6 #else // __clang__ #define PRAGMACLANG(str) +#define PRAGMACLANG6(str) #endif // __clang__ #ifdef __GNUC__ diff --git a/src/utils/process.cpp b/src/utils/process.cpp index a1c9d8a72..72deaad5b 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -212,10 +212,10 @@ bool execFile(const std::string &pathName, const std::string &name, arg2.c_str(), static_cast<char *>(nullptr)); } _exit(-1); - PRAGMA45(GCC diagnostic push) - PRAGMA45(GCC diagnostic ignored "-Wunreachable-code-return") + PRAGMACLANG6(GCC diagnostic push) + PRAGMACLANG6(GCC diagnostic ignored "-Wunreachable-code-return") return false; - PRAGMA45(GCC diagnostic pop) + PRAGMACLANG6(GCC diagnostic pop) } return true; } |