Check gcc version for diagnostic once.

This commit is contained in:
Victor Zverovich 2013-11-16 07:19:41 -08:00
parent 16cb991fd8
commit d49845510e

View File

@ -56,12 +56,11 @@
# define FMT_NOEXCEPT(expr)
#endif
#ifdef __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
# define FMT_GCC_DIAGNOSTIC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wlong-long"
#endif
#endif
namespace fmt {
@ -1235,10 +1234,8 @@ inline Formatter<Write> Print(StringRef format) {
}
}
#ifdef __GNUC__
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#ifdef FMT_GCC_DIAGNOSTIC
# pragma GCC diagnostic pop
#endif
#endif
#endif // FORMAT_H_