From: Benjamin Peterson Date: Thu, 16 May 2013 20:33:00 +0000 (-0500) Subject: make GCC complain about declarations not at the top of blocks X-Git-Tag: v3.4.0a1~714 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43b2ab96bc63f037bd7e1504241c2feaef684fc6;p=python make GCC complain about declarations not at the top of blocks --- diff --git a/configure b/configure index 725250bb3a..37c51cc42a 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 03f90729bd..647de88600 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