diff options
Diffstat (limited to 'm4/ax_compiler_flags_cflags.m4')
-rw-r--r-- | m4/ax_compiler_flags_cflags.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 index 1f8ef1f7..7f2388de 100644 --- a/m4/ax_compiler_flags_cflags.m4 +++ b/m4/ax_compiler_flags_cflags.m4 @@ -25,7 +25,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 4 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) @@ -53,6 +53,10 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ $3 dnl ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + # In the flags below, when disabling specific flags, always add *both* + # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) + # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall, + # which effectively turns that flag back on again as an error. AS_IF([test "$ax_enable_compile_warnings" != "no"],[ # "minimum" flags AX_APPEND_COMPILE_FLAGS([ dnl @@ -74,7 +78,9 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ -Wstrict-prototypes dnl -Wredundant-decls dnl -Wno-unused-parameter dnl + -Wno-error=unused-parameter dnl -Wno-missing-field-initializers dnl + -Wno-error=missing-field-initializers dnl -Wdeclaration-after-statement dnl -Wformat=2 dnl -Wold-style-definition dnl |