mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r22728) -Codechange: add -Wno-narrowing to cxxflags in order to prevent many useless warnings with GCC 4.7
This commit is contained in:
parent
6a87848809
commit
6e99c40087
@ -1299,6 +1299,13 @@ make_compiler_cflags() {
|
|||||||
cxxflags="$cxxflags -std=gnu++0x"
|
cxxflags="$cxxflags -std=gnu++0x"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $cc_version -ge 47 ]; then
|
||||||
|
# Disable -Wnarrowing which gives many warnings, such as:
|
||||||
|
# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
|
||||||
|
# They are valid according to the C++ standard, but useless.
|
||||||
|
cxxflags="$cxxflags -Wno-narrowing"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$enable_lto" != "0" ]; then
|
if [ "$enable_lto" != "0" ]; then
|
||||||
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
|
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
|
||||||
has_lto=`$1 -dumpspecs | grep '\%{flto'`
|
has_lto=`$1 -dumpspecs | grep '\%{flto'`
|
||||||
|
Loading…
Reference in New Issue
Block a user