]> The Tcpdump Group git mirrors - tcpdump/blobdiff - diag-control.h
Address some issues with XL C on Linux/POWER9.
[tcpdump] / diag-control.h
index 8c9ca7214e04ab9b045362ebfb86220c71f9d365..efebec455a8081d095cd8901d73b6ab9d8872933 100644 (file)
   #define DIAG_DO_PRAGMA(x) _Pragma (#x)
 #endif
 
+/*
+ * XL C 12.1 and 13.1 for AIX require no attention in this department.
+ * XL C 16.1 defines both __GNUC__ and __clang__, so has to be tested first.
+ */
+#if ND_IS_AT_LEAST_XL_C_VERSION(16,1)
+  /*
+   * See respective Clang note below.
+   */
+  #define DIAG_OFF_ASSIGN_ENUM \
+    DIAG_DO_PRAGMA(clang diagnostic push) \
+    DIAG_DO_PRAGMA(clang diagnostic ignored "-Wassign-enum")
+  #define DIAG_ON_ASSIGN_ENUM \
+    DIAG_DO_PRAGMA(clang diagnostic pop)
+
+  #define DIAG_OFF_CAST_QUAL
+  #define DIAG_ON_CAST_QUAL
+  #define DIAG_OFF_DEPRECATION
+  #define DIAG_ON_DEPRECATION
 /*
  * The current clang compilers also define __GNUC__ and __GNUC_MINOR__
  * thus we need to test the clang case before the GCC one
  */
-#if ND_IS_AT_LEAST_CLANG_VERSION(2,8)
+#elif ND_IS_AT_LEAST_CLANG_VERSION(2,8)
   /*
    * Clang complains if you OR together multiple enum values of a
    * given enum type and them pass it as an argument of that enum