From 1733198bf556ca6431ade8fad7df83fccd4cc57f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 9 Sep 2013 15:47:09 -0700 Subject: [PATCH] Guard gcc pragmas from -dumb compilers- MSVC. --- format.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/format.h b/format.h index f8075e11..770471f8 100644 --- a/format.h +++ b/format.h @@ -55,8 +55,10 @@ # define FMT_NOEXCEPT(expr) #endif -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wlong-long" +#endif namespace fmt { @@ -1168,6 +1170,8 @@ inline Formatter Print(StringRef format) { } } -#pragma GCC diagnostic pop +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif #endif // FORMAT_H_