more warnings.h - macOS issue

It turns out that macOS barked when a POP was issued without
a prior PUSH, so since the DISABLE_WARNING_CONDEXPR_IS_CONSTANT
expanded to an empty macro on that platform.

Include a corresponding
RESTORE_WARNING_CONDEXPR_IS_CONSTANT macro for use with that
particular warning.
This commit is contained in:
nhmall
2021-02-01 13:37:04 -05:00
parent 6aa94ebf57
commit e25b16e844
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -35,6 +35,7 @@
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunreachable-code\"")
#define DISABLE_WARNING_CONDEXPR_IS_CONSTANT
#define RESTORE_WARNING_CONDEXPR_IS_CONSTANT
#define RESTORE_WARNINGS _Pragma("clang diagnostic pop")
#define STDC_Pragma_AVAILABLE
@@ -44,6 +45,7 @@
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wunreachable-code\"")
#define DISABLE_WARNING_CONDEXPR_IS_CONSTANT
#define RESTORE_WARNING_CONDEXPR_IS_CONSTANT
#define RESTORE_WARNINGS _Pragma("GCC diagnostic pop")
#define STDC_Pragma_AVAILABLE
@@ -54,6 +56,7 @@
#define DISABLE_WARNING_CONDEXPR_IS_CONSTANT \
_Pragma("warning( push )") \
_Pragma("warning( disable : 4127 )")
#define RESTORE_WARNINGCONDEXPR_IS_CONSTANT _Pragma("warning( pop )")
#define RESTORE_WARNINGS _Pragma("warning( pop )")
#define STDC_Pragma_AVAILABLE