;;
esac
+ case $WARN_CFLAGS in
+ *-Wsuggest-attribute=format*)
+ AC_DEFINE([HAVE_SUGGEST_ATTRIBUTE_FORMAT], [1], [Whether -Wsuggest-attribute=format works])
+ ;;
+ esac
+
# Silence certain warnings in gnulib, and use improved glibc headers
AC_DEFINE([lint], [1],
[Define to 1 if the compiler is checking for lint.])
# define VIR_WARNINGS_NO_CAST_ALIGN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wcast-align\"")
-# define VIR_WARNINGS_NO_PRINTF \
+
+# if HAVE_SUGGEST_ATTRIBUTE_FORMAT
+# define VIR_WARNINGS_NO_PRINTF \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")
+# else
+# define VIR_WARNINGS_NO_PRINTF \
+ _Pragma ("GCC diagnostic push")
+# endif
# define VIR_WARNINGS_RESET \
_Pragma ("GCC diagnostic pop")