diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-02-20 18:34:34 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-02-23 09:36:51 +0000 |
commit | 6f2a9bf0ce1e095195b053e0d9a8bd79ebac4de7 (patch) | |
tree | 311ffd162f5185246fc4e3b21c4c4332a761d64d /m4/ax_compiler_flags_cflags.m4 | |
parent | 407ddbbc953737a6e3f603982a7362dddb2889c9 (diff) | |
download | autoconf-archive-6f2a9bf0ce1e095195b053e0d9a8bd79ebac4de7.tar.gz |
ax_compiler_flags: Eliminate ‘minimum’ and ‘maximum’ warning levels
These went against the whole concept of providing a baseline set of
warnings which is set by the module maintainer, since it allowed
individual developers to opt out of certain classes of warning.
Remove them, leaving the ‘no’, ‘yes’ and ‘error’ levels. This maintains
API compatibility of the macros by marking various EXTRA-* variables as
unused, but still handling them, and merging their values with the
preceding EXTRA-* variables. For example, all extra ‘maximum’ and
‘error’ flags are now included in the ‘yes’ level of warnings.
Diffstat (limited to 'm4/ax_compiler_flags_cflags.m4')
-rw-r--r-- | m4/ax_compiler_flags_cflags.m4 | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 index e4f64c5..295d7fe 100644 --- a/m4/ax_compiler_flags_cflags.m4 +++ b/m4/ax_compiler_flags_cflags.m4 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-MINIMUM-FLAGS], [EXTRA-YES-FLAGS], [EXTRA-MAXIMUM-FLAGS], [EXTRA-ERROR-FLAGS]) +# AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) # # DESCRIPTION # @@ -25,7 +25,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 8 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) @@ -56,16 +56,9 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) AS_IF([test "$ax_enable_compile_warnings" != "no"],[ - # "minimum" flags - AX_APPEND_COMPILE_FLAGS([ dnl - -Wall dnl - $4 dnl - ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) - ]) - AS_IF([test "$ax_enable_compile_warnings" != "no" -a \ - "$ax_enable_compile_warnings" != "minimum"],[ # "yes" flags AX_APPEND_COMPILE_FLAGS([ dnl + -Wall dnl -Wextra dnl -Wundef dnl -Wnested-externs dnl @@ -97,16 +90,12 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ -Warray-bounds dnl -Wimplicit-function-declaration dnl -Wreturn-type dnl - $5 dnl - ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) - ]) - AS_IF([test "$ax_enable_compile_warnings" = "maximum" -o \ - "$ax_enable_compile_warnings" = "error"],[ - # "maximum" flags - AX_APPEND_COMPILE_FLAGS([ dnl -Wswitch-enum dnl -Wswitch-default dnl + $4 dnl + $5 dnl $6 dnl + $7 dnl ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) ]) AS_IF([test "$ax_enable_compile_warnings" = "error"],[ @@ -119,7 +108,6 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AX_APPEND_COMPILE_FLAGS([ dnl -Wno-suggest-attribute=format dnl - $7 dnl ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) ]) |