diff options
Diffstat (limited to 'src/fundamental/macro-fundamental.h')
-rw-r--r-- | src/fundamental/macro-fundamental.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h index 709657dd28..5eb31cd742 100644 --- a/src/fundamental/macro-fundamental.h +++ b/src/fundamental/macro-fundamental.h @@ -48,6 +48,28 @@ _Pragma("GCC diagnostic push"); \ _Pragma("GCC diagnostic ignored \"-Waddress\"") +#define DISABLE_WARNING_STRINGOP_TRUNCATION \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wstringop-truncation\"") + +#if HAVE_WARNING_ZERO_LENGTH_BOUNDS +# define DISABLE_WARNING_ZERO_LENGTH_BOUNDS \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wzero-length-bounds\"") +#else +# define DISABLE_WARNING_ZERO_LENGTH_BOUNDS \ + _Pragma("GCC diagnostic push") +#endif + +#if HAVE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT +# define DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"") +#else +# define DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT \ + _Pragma("GCC diagnostic push") +#endif + #define REENABLE_WARNING \ _Pragma("GCC diagnostic pop") |