Skip to content
Snippets Groups Projects
Commit 42f39c54 authored by Ralph Giles's avatar Ralph Giles
Browse files

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.
parent 933a2754
No related branches found
No related tags found
No related merge requests found
......@@ -224,12 +224,13 @@ AC_SUBST(SYMBOL_VISIBILITY)
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment