]> granicus.if.org Git - python/commitdiff
make GCC complain about declarations not at the top of blocks
authorBenjamin Peterson <benjamin@python.org>
Thu, 16 May 2013 20:33:00 +0000 (15:33 -0500)
committerBenjamin Peterson <benjamin@python.org>
Thu, 16 May 2013 20:33:00 +0000 (15:33 -0500)
configure
configure.ac

index 725250bb3aaf620ea21b097f964fd94d6a138d59..37c51cc42ae2cea11c03e6942e36a25165592c88 100755 (executable)
--- a/configure
+++ b/configure
@@ -6264,6 +6264,8 @@ UNIVERSAL_ARCH_FLAGS=
 # tweak BASECFLAGS based on compiler and platform
 case $GCC in
 yes)
+    BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
+
     # Python doesn't violate C99 aliasing rules, but older versions of
     # GCC produce warnings for legal Python code.  Enable
     # -fno-strict-aliasing on versions of GCC that support but produce
index 03f90729bde8d96f306aca1579e0f25fce1b21e9..647de886005c00d1e06125921e17d12a8d797ed0 100644 (file)
@@ -1127,6 +1127,8 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS)
 # tweak BASECFLAGS based on compiler and platform
 case $GCC in
 yes)
+    BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
+
     # Python doesn't violate C99 aliasing rules, but older versions of
     # GCC produce warnings for legal Python code.  Enable
     # -fno-strict-aliasing on versions of GCC that support but produce