diff --git a/format.h b/format.h index 179a823e..04c11e75 100644 --- a/format.h +++ b/format.h @@ -52,7 +52,6 @@ # if FMT_GCC_VERSION >= 406 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wlong-long" -# pragma GCC diagnostic ignored "-Wvariadic-macros" # endif #else # define FMT_GCC_EXTENSION @@ -2095,6 +2094,12 @@ inline void FormatDec(char *&buffer, T value) { } } +#if FMT_GCC_VERSION +// Use the system_header pragma to suppress warnings about variadic macros +// because suppressing -Wvariadic-macros with the diagnostic pragma doesn't work. +# pragma GCC system_header +#endif + #define FMT_CONCATENATE(arg1, arg2) FMT_CONCATENATE1(arg1, arg2) #define FMT_CONCATENATE1(arg1, arg2) FMT_CONCATENATE2(arg1, arg2) #define FMT_CONCATENATE2(arg1, arg2) arg1##arg2