diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-09-10 13:44:21 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-09-10 20:44:59 +0000 |
commit | 51ee234eee37a322898e35e237aa65f53ded12f0 (patch) | |
tree | bca241f089dcc0cf4d522109a0b54c5705646b82 /epan/dfilter | |
parent | d061b94ab62b4c7602e7c658247c6a2adb1592c3 (diff) |
Test with (llvm-)GCC pragmas, as the buildbot builds with llvm-gcc.
Change-Id: Ic1dd2e4d17cabb1cd62f8b1ad211dc6915835359
Reviewed-on: https://code.wireshark.org/review/29578
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dfilter')
-rw-r--r-- | epan/dfilter/scanner.l | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l index 1f7e28f5ef..08d7713a23 100644 --- a/epan/dfilter/scanner.l +++ b/epan/dfilter/scanner.l @@ -84,8 +84,19 @@ #else #error This is __clang_major__ and __clang_minor__ #endif + #elif defined(__GNUC__) + #if WS_IS_AT_LEAST_GNUC_VERSION(4,8) + _Pragma("gcc diagnostic push") + _Pragma("gcc diagnostic ignored \"-Wsign-compare\"") + _Pragma("gcc diagnostic push") + _Pragma("gcc diagnostic ignored \"-Wshorten-64-to-32\"") + _Pragma("gcc diagnostic push") + _Pragma("gcc diagnostic ignored \"-Wunreachable-code\"") + #else + #error This is __GNUC__ and __GNUC_MINOR__ + #endif #else - #error This is not clang + #error This is not clang or GCC #endif #else DIAG_OFF_FLEX |