aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPhilip <pipcet@gmail.com>2015-04-27 13:28:03 +0000
committerPhilip <pipcet@gmail.com>2015-04-27 13:28:03 +0000
commit2e51f0ee632efb734f4942f7db073d021adb5c74 (patch)
tree4557336bbcdd252eba402bb882f3e809fc9fcbe2 /configure
parent1351de6ad1bf59630026d86db5b6a94c109d6816 (diff)
downloadtinycc-2e51f0ee632efb734f4942f7db073d021adb5c74.tar.gz
tinycc-2e51f0ee632efb734f4942f7db073d021adb5c74.tar.bz2
warn about declarations after statements when compiling with gcc.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index 5b9b9c1..9bef59f 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)"