From 2e51f0ee632efb734f4942f7db073d021adb5c74 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 27 Apr 2015 13:28:03 +0000 Subject: [PATCH] warn about declarations after statements when compiling with gcc. --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 5b9b9c17..9bef59fd 100755 --- a/configure +++ b/configure @@ -387,6 +387,11 @@ else fi # a final configuration tuning +W_OPTIONS="declaration-after-statement" +for i in $W_OPTIONS; do + O_PRESENT="$($cc -v --help 2>&1 | grep -- -W$i)" + if test -n "$O_PRESENT"; then CFLAGS="$CFLAGS -W$i"; fi +done W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign sign-compare unused-result uninitialized" for i in $W_OPTIONS; do O_PRESENT="$($cc -v --help 2>&1 | grep -- -W$i)" -- 2.11.4.GIT