summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-09-28 13:20:32 +0300
committerTor Lillqvist <tml@iki.fi>2011-09-28 13:21:36 +0300
commitd455410a3de86d2c772a96e50ff0d4c066c1605e (patch)
tree010e9ca13323e0d6073d53f4cde332cafdcce572 /rsc
parenta22a722ddb415d8b61a840fff4b39f919242bfe8 (diff)
Look at GCC version, not whether MacOSX or not
Diffstat (limited to 'rsc')
-rw-r--r--rsc/source/parser/rscyacc.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index b48537a7529c..4c8f981f6300 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -265,7 +265,11 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop )
#pragma warning(disable:4129 4273 4701 4702)
#endif
#if defined __GNUC__
-#ifndef MACOSX
+#define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+/* Diagnostics pragma was introduced with gcc-4.2.1 */
+#if GCC_VERSION >= 40201
#pragma GCC diagnostic ignored "-Wwrite-strings"
#endif
#elif defined __SUNPRO_CC