From 8198df84f06ac88787c5f26f856c43336c813de4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 24 Jun 2014 13:01:44 -0700 Subject: [PATCH] Suppress warnings about variadic macros. --- format.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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