DIAGNOSTIC_IGNORE ("-Wuser-defined-warnings")
# endif
+# if __has_warning ("-Wunused-but-set-variable")
+# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE \
+ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable")
+# endif
+
# define DIAGNOSTIC_ERROR_SWITCH \
DIAGNOSTIC_ERROR ("-Wswitch")
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
+# if __GNUC__ >= 5
+# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE \
+ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable")
+# endif
+
/* GCC 4.8's "diagnostic push/pop" seems broken when using this, -Wswitch
remains enabled at the error level even after a pop. Therefore, don't
use it for GCC < 5. */
# define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS
#endif
+#ifndef DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE
+# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE
+#endif
+
#ifndef DIAGNOSTIC_ERROR_SWITCH
# define DIAGNOSTIC_ERROR_SWITCH
#endif