summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2012-11-11 17:39:54 +0000
committersmatz <smatz@openttd.org>2012-11-11 17:39:54 +0000
commit75e20fd02b75d6236a6da0f61478ea06a9bcd8b6 (patch)
tree5af6172aeb7e2c539eea40d304958721e99b220c /config.lib
parent03736af2aee50db4e36c2cd9127085630f82cd4b (diff)
downloadopenttd-75e20fd02b75d6236a6da0f61478ea06a9bcd8b6.tar.xz
(svn r24701) -Fix [FS#5246]: Workaround an overoptimisation done by GCC 4.5
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.lib b/config.lib
index 55dbc9a16..6f215455a 100644
--- a/config.lib
+++ b/config.lib
@@ -1350,6 +1350,12 @@ make_compiler_cflags() {
cxxflags="$cxxflags -std=gnu++0x"
fi
+ if [ $cc_version -eq 45 ]; then
+ # Prevent optimisation supposing enums are in a range specified by the standard
+ # For details, see http://gcc.gnu.org/PR43680
+ flags="$flags -fno-tree-vrp"
+ 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]