Kaydet (Commit) 43b2ab96 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

make GCC complain about declarations not at the top of blocks

üst aa965883
...@@ -6264,6 +6264,8 @@ UNIVERSAL_ARCH_FLAGS= ...@@ -6264,6 +6264,8 @@ UNIVERSAL_ARCH_FLAGS=
# tweak BASECFLAGS based on compiler and platform # tweak BASECFLAGS based on compiler and platform
case $GCC in case $GCC in
yes) yes)
BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
# Python doesn't violate C99 aliasing rules, but older versions of # Python doesn't violate C99 aliasing rules, but older versions of
# GCC produce warnings for legal Python code. Enable # GCC produce warnings for legal Python code. Enable
# -fno-strict-aliasing on versions of GCC that support but produce # -fno-strict-aliasing on versions of GCC that support but produce
......
...@@ -1127,6 +1127,8 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) ...@@ -1127,6 +1127,8 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS)
# tweak BASECFLAGS based on compiler and platform # tweak BASECFLAGS based on compiler and platform
case $GCC in case $GCC in
yes) yes)
BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
# Python doesn't violate C99 aliasing rules, but older versions of # Python doesn't violate C99 aliasing rules, but older versions of
# GCC produce warnings for legal Python code. Enable # GCC produce warnings for legal Python code. Enable
# -fno-strict-aliasing on versions of GCC that support but produce # -fno-strict-aliasing on versions of GCC that support but produce
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment