summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-23 21:55:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-25 08:52:54 +0100
commitfa545023ada3f2a5f79cab1ff628fd18434c7c2e (patch)
tree7bb5c0f01264f9b53724baa1b0ef7b7e80e23b3d /idlc
parentc940e3d8b3895c550fb37e0e9acbd19b4bb3515e (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 'idlc')
-rw-r--r--idlc/source/scanner.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index 4c123ea8f0c3..166c281fefd1 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -23,6 +23,8 @@
* scanner.ll - Lexical scanner for IDLC 1.0
*/
+#include "sal/config.h"
+
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@@ -247,11 +249,9 @@ static void parseLineAndFile(sal_Char* pBuf)
}
// Suppress any warnings from generated code:
-#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
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER