diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-23 21:55:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-25 08:52:54 +0100 |
commit | fa545023ada3f2a5f79cab1ff628fd18434c7c2e (patch) | |
tree | 7bb5c0f01264f9b53724baa1b0ef7b7e80e23b3d /rsc/source | |
parent | c940e3d8b3895c550fb37e0e9acbd19b4bb3515e (diff) |
Introduce HAVE_GCC_PRAGMA_DIAGNOSTIC_{MODIFY,SCOPE}
...replacing hard-coded GCC version checks. Those checks that guard
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
appear relevant only for GCC itself, not Clang (which used to fail the old
guards because it typically announces itself with a rather low
__GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3
"Enable -Wnon-virtual-dtor for GCC 4.6"
Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/parser/rscyacc.y | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index d0be59ede316..16d2833f53ac 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -18,6 +18,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + #include <stdio.h> #include <ctype.h> #include <string.h> @@ -256,14 +258,8 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop ) #pragma warning(push, 1) #pragma warning(disable:4129 4273 4701 4702) #endif -#if defined __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -/* Diagnostics pragma was introduced with gcc-4.2.1 */ -#if GCC_VERSION >= 40201 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wwrite-strings" -#endif #elif defined __SUNPRO_CC #pragma disable_warn #endif |