aboutsummaryrefslogtreecommitdiff
path: root/include/diagnostics.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/diagnostics.h')
-rw-r--r--include/diagnostics.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/diagnostics.h b/include/diagnostics.h
index 3da8828..dbe6288 100644
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -63,6 +63,11 @@
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
+# if __has_warning ("-Wuser-defined-warnings")
+# define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS \
+ DIAGNOSTIC_IGNORE ("-Wuser-defined-warnings")
+# endif
+
# define DIAGNOSTIC_ERROR_SWITCH \
DIAGNOSTIC_ERROR ("-Wswitch")
@@ -121,6 +126,10 @@
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
#endif
+#ifndef DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS
+# define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS
+#endif
+
#ifndef DIAGNOSTIC_ERROR_SWITCH
# define DIAGNOSTIC_ERROR_SWITCH
#endif