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 /l10ntools | |
parent | Remove unused macros from checked-in Flex/Bison output (diff) | |
download | core-fa545023ada3f2a5f79cab1ff628fd18434c7c2e.tar.gz core-fa545023ada3f2a5f79cab1ff628fd18434c7c2e.zip |
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 'l10ntools')
-rw-r--r-- | l10ntools/source/cfglex.l | 6 | ||||
-rw-r--r-- | l10ntools/source/srclex.l | 6 | ||||
-rw-r--r-- | l10ntools/source/xrmlex.l | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l index e8e6b1ab24d0..ea9e7b4178e6 100644 --- a/l10ntools/source/cfglex.l +++ b/l10ntools/source/cfglex.l @@ -21,6 +21,8 @@ * lexer for parsing cfg source files */ +#include "sal/config.h" + /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX #define YYLMAX 64000 @@ -40,11 +42,9 @@ #include "sal/main.h" -#if defined __GNUC__ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#endif #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l index 755b0b382008..6716b1b9a704 100644 --- a/l10ntools/source/srclex.l +++ b/l10ntools/source/srclex.l @@ -22,6 +22,8 @@ * lexer for parsing resource source files (*.src) */ +#include "sal/config.h" + /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX #define YYLMAX 64000 @@ -41,11 +43,9 @@ #include "sal/main.h" -#if defined __GNUC__ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#endif #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l index ad5b9490c097..7513edd6cab1 100644 --- a/l10ntools/source/xrmlex.l +++ b/l10ntools/source/xrmlex.l @@ -21,6 +21,8 @@ * lexer for parsing xml-property source files (*.xml) */ +#include "sal/config.h" + /* enlarge token buffer to tokenize whole strings */ #undef YYLMAX #define YYLMAX 64000 @@ -40,11 +42,9 @@ #include "sal/main.h" -#if defined __GNUC__ -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#endif #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif |