[Libreoffice-commits] .: rsc/source

Tor Lillqvist tml at kemper.freedesktop.org
Wed Sep 28 03:24:44 PDT 2011


 rsc/source/parser/rscyacc.y |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d455410a3de86d2c772a96e50ff0d4c066c1605e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Sep 28 13:20:32 2011 +0300

    Look at GCC version, not whether MacOSX or not

diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index b48537a..4c8f981 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


More information about the Libreoffice-commits mailing list