Bug 659707. Add -Wdeclaration-after-statement to CFLAGS. r=khuey

MSVC doesn't like declarations after statements so we should
warn on other platforms too.
This commit is contained in:
Jeff Muizelaar 2011-05-25 14:50:08 -04:00
Родитель aa5766245b
Коммит 1adf7ed0c3
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1544,10 +1544,11 @@ if test "$GNU_CC"; then
# -Wall - turn on all warnings
# -pedantic - make compiler warn about non-ANSI stuff, and
# be a little bit stricter
# -Wdeclaration-after-statement - MSVC doesn't like these
# Warnings slamm took out for now (these were giving more noise than help):
# -Wbad-function-cast - warns when casting a function to a new return type
# -Wshadow - removed because it generates more noise than help --pete
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith"
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith -Wdeclaration-after-statement"
if test -z "$INTEL_CC"; then
# Don't use -Wcast-align with ICC
case "$CPU_ARCH" in