summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-05-16 20:33:00 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-05-16 20:33:00 (GMT)
commit43b2ab96bc63f037bd7e1504241c2feaef684fc6 (patch)
treee721ad430f5d82563728c9d63cb8e9e808d81da6
parentaa96588399da6b77767e5a6df675a035e3f72da6 (diff)
downloadcpython-43b2ab96bc63f037bd7e1504241c2feaef684fc6.zip
cpython-43b2ab96bc63f037bd7e1504241c2feaef684fc6.tar.gz
cpython-43b2ab96bc63f037bd7e1504241c2feaef684fc6.tar.bz2
make GCC complain about declarations not at the top of blocks
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
2 files changed, 4 insertions, 0 deletions
diff --git a/configure b/configure
index 725250b..37c51cc 100755
--- 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
diff --git a/configure.ac b/configure.ac
index 03f9072..647de88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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