[Python-checkins] cpython: make GCC complain about declarations not at the top of blocks
benjamin.peterson
python-checkins at python.org
Thu May 16 22:33:15 CEST 2013
http://hg.python.org/cpython/rev/a3559c8c614b
changeset: 83796:a3559c8c614b
user: Benjamin Peterson <benjamin at python.org>
date: Thu May 16 15:33:00 2013 -0500
summary:
make GCC complain about declarations not at the top of blocks
files:
configure | 2 ++
configure.ac | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6264,6 +6264,8 @@
# 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
--- a/configure.ac
+++ b/configure.ac
@@ -1127,6 +1127,8 @@
# 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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list