aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-09-10 13:16:45 -0700
committerGuy Harris <guy@alum.mit.edu>2018-09-10 20:17:21 +0000
commitd061b94ab62b4c7602e7c658247c6a2adb1592c3 (patch)
treef4a0a89687e9a5616ea720e0cf9511444605caca /epan/dfilter
parent400f748b04da6dfaf26404aa6dabfec11b3c7607 (diff)
Test what kind of compiler we have running on the macOS buildbot.
Change-Id: Ib1a14256ce0fbcfa357368e8431705606a8412e0 Reviewed-on: https://code.wireshark.org/review/29574 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dfilter')
-rw-r--r--epan/dfilter/scanner.l20
1 files changed, 14 insertions, 6 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l
index 5b22242a5e..1f7e28f5ef 100644
--- a/epan/dfilter/scanner.l
+++ b/epan/dfilter/scanner.l
@@ -73,12 +73,20 @@
* Disable diagnostics in the code generated by Flex.
*/
#if defined(__APPLE__)
-_Pragma("clang diagnostic push")
-_Pragma("clang diagnostic ignored \"-Wsign-compare\"")
-_Pragma("clang diagnostic push")
-_Pragma("clang diagnostic ignored \"-Wshorten-64-to-32\"")
-_Pragma("clang diagnostic push")
-_Pragma("clang diagnostic ignored \"-Wunreachable-code\"")
+ #if defined(__clang__)
+ #if WS_IS_AT_LEAST_CLANG_VERSION(2,8)
+ _Pragma("clang diagnostic push")
+ _Pragma("clang diagnostic ignored \"-Wsign-compare\"")
+ _Pragma("clang diagnostic push")
+ _Pragma("clang diagnostic ignored \"-Wshorten-64-to-32\"")
+ _Pragma("clang diagnostic push")
+ _Pragma("clang diagnostic ignored \"-Wunreachable-code\"")
+ #else
+ #error This is __clang_major__ and __clang_minor__
+ #endif
+ #else
+ #error This is not clang
+ #endif
#else
DIAG_OFF_FLEX
#endif