diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-05 19:42:04 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-05 19:42:04 +0200 |
commit | 072927905a3b66281c6311b4b351caa501d8b73a (patch) | |
tree | b98e1d3bf8f7cb4c6a7edefacef779d051e44645 /configure.ac | |
parent | Another bug fix for flush marker detection. (diff) | |
download | xz-072927905a3b66281c6311b4b351caa501d8b73a.tar.xz |
Rearranged testing of GCC-specific flags.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 4c34c719..e0b394a5 100644 --- a/configure.ac +++ b/configure.ac @@ -545,13 +545,29 @@ if test -n "$GCC" ; then # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations # don't seem so useful here; at least the last one gives some # warnings which are not bugs. - for NEW_FLAG in -Wextra -Wformat=2 -Winit-self -Wstrict-aliasing=2 \ - -Wfloat-equal -Wshadow -Wpointer-arith \ - -Wbad-function-cast -Wwrite-strings \ - -Waggregate-return -Wstrict-prototypes \ - -Wold-style-definition -Wmissing-prototypes \ - -Wmissing-declarations -Wmissing-noreturn \ - -Wredundant-decls + # + # The flags are in reverse order below so they end up in "beautiful" + # order on the actual command line. + for NEW_FLAG in \ + -Wredundant-decls \ + -Wmissing-noreturn \ + -Wmissing-declarations \ + -Wmissing-prototypes \ + -Wold-style-definition \ + -Wstrict-prototypes \ + -Waggregate-return \ + -Wwrite-strings \ + -Wbad-function-cast \ + -Wpointer-arith \ + -Wshadow \ + -Wfloat-equal \ + -Wstrict-aliasing=2 \ + -Winit-self \ + -Wformat=2 \ + -Wextra \ + -Wall \ + -pedantic \ + -std=c99 do AC_MSG_CHECKING([if $CC accepts $NEW_FLAG]) OLD_CFLAGS="$CFLAGS" @@ -571,9 +587,6 @@ if test -n "$GCC" ; then if test "x$enable_werror" = "xyes"; then CFLAGS="-Werror $CFLAGS" fi - - # IIRC these work with all GCC versions that support -std=c99: - CFLAGS="-std=c99 -pedantic -Wall $CFLAGS" fi AM_CONDITIONAL([COND_WNO_UNINITIALIZED], test "x$Wno_uninitialized" = "xyes") |