From 64da211c62066bd4471e09158602ea01ca734e65 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 11 Apr 2012 22:59:23 +0000 Subject: [PATCH] math: do not use #pragma diagnostic push for GCC prior to 4.6. --- src/lol/math/vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lol/math/vector.h b/src/lol/math/vector.h index 12bb4600..b594218d 100644 --- a/src/lol/math/vector.h +++ b/src/lol/math/vector.h @@ -1170,7 +1170,7 @@ DECLARE_ALL_VECTOR_OPS(uint64_t) * will be used. * Also we do this for the whole block of declarations, because GCC prior * to 4.6.3 does not appear to support _Pragma() inside a macro. */ -#if defined __GNUC__ && (__GNUC__ >= 4) +#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wsign-compare" #elif defined _MSC_VER @@ -1285,7 +1285,7 @@ DECLARE_ALL_VECTOR_COERCE_OPS(double, real) DECLARE_ALL_VECTOR_COERCE_OPS(long double, real) #endif -#if defined __GNUC__ && (__GNUC__ >= 4) +#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) # pragma GCC diagnostic pop #elif defined _MSC_VER # pragma warning(pop)