ref: 42f39c547b5a377cd80f749e0ec4a3ebd9664341
parent: 933a2754fcc724d218b6fa041aa7281cd759dafa
author: Ralph Giles <[email protected]>
date: Mon Mar 11 06:59:13 EDT 2013
Add -Wdeclaration-after-statement. We keep accidentally adding these which break the -pedantic build, so complain about it in the normal build. Also de-duplicate the warning list.
--- a/configure.ac
+++ b/configure.ac
@@ -224,12 +224,13 @@
CFLAGS="$CFLAGS -W"
+warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wdeclaration-after-statement"
saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes"
-AC_MSG_CHECKING([if ${CC} supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes])
+CFLAGS="$CFLAGS $warn_CFLAGS"
+AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
[ AC_MSG_RESULT([yes])
- EXTRA_WARNS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" ],
+ EXTRA_WARNS=$warn_CFLAGS ],
AC_MSG_RESULT([no]))
CFLAGS="$saved_CFLAGS $EXTRA_WARNS"