summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/diagnostics.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/diagnostics.h b/include/diagnostics.h
index d3ff27bc008..41e6db65391 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -76,6 +76,11 @@
# define DIAGNOSTIC_ERROR_SWITCH \
DIAGNOSTIC_ERROR ("-Wswitch")
+# if __has_warning ("-Wenum-constexpr-conversion")
+# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \
+ DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion")
+# endif
+
#elif defined (__GNUC__) /* GCC */
# define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \
@@ -155,4 +160,8 @@
# define DIAGNOSTIC_ERROR_SWITCH
#endif
+#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
+# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
+#endif
+
#endif /* DIAGNOSTICS_H */