mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
BUILD: Disable -Wshadow and -Wmissing-field-initializers before GCC 5
They just gave many false positives creating a lot of noise in build logs for ports using an older GCC.
This commit is contained in:
parent
3749b21f18
commit
a5106d86ef
2
Makefile
2
Makefile
@ -33,7 +33,7 @@ ifeq "$(HAVE_GCC)" "1"
|
||||
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
|
||||
# Enable even more warnings...
|
||||
CXXFLAGS+= -Wpointer-arith -Wcast-qual
|
||||
CXXFLAGS+= -Wshadow -Wnon-virtual-dtor -Wwrite-strings
|
||||
CXXFLAGS+= -Wnon-virtual-dtor -Wwrite-strings
|
||||
|
||||
# Currently we disable this gcc flag, since it will also warn in cases,
|
||||
# where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
|
||||
|
9
configure
vendored
9
configure
vendored
@ -2201,8 +2201,17 @@ if test "$have_gcc" = yes; then
|
||||
cxx_version=`gcc_get_define __clang_version__`
|
||||
cxx_version="`echo "${cxx_version}" | sed -e 's/"\([^ ]*\) .*/\1/'`"
|
||||
cxx_version="clang $cxx_version, ok"
|
||||
|
||||
append_var CXXFLAGS "-Wshadow"
|
||||
else
|
||||
cxx_version="GCC $cxx_version, ok"
|
||||
|
||||
# Way too many false positives before GCC 5
|
||||
if test $_cxx_major -ge 5; then
|
||||
append_var CXXFLAGS "-Wshadow"
|
||||
else
|
||||
append_var CXXFLAGS "-Wno-missing-field-initializers"
|
||||
fi
|
||||
fi
|
||||
elif test "$have_icc" = yes; then
|
||||
cxx_version="`( $CXX -dumpversion ) 2>/dev/null`"
|
||||
|
Loading…
x
Reference in New Issue
Block a user