diff options
author | smatz <smatz@openttd.org> | 2010-10-31 14:25:57 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2010-10-31 14:25:57 +0000 |
commit | 15179978686721cfc9f51c1b8f2d6b95ae009492 (patch) | |
tree | 4afdda3d1c562700fccab76755ed32c5cc74dbd8 | |
parent | 7e48d85104549cbb3604aa7eb262b922dbc3f640 (diff) | |
download | openttd-15179978686721cfc9f51c1b8f2d6b95ae009492.tar.xz |
(svn r21062) -Codechange: append -Winit-self to compiler flags
-rw-r--r-- | config.lib | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config.lib b/config.lib index d9dab6cc7..1ea1f6dc8 100644 --- a/config.lib +++ b/config.lib @@ -1198,6 +1198,12 @@ make_compiler_cflags() { fi fi + if [ $cc_version -ge 34 ]; then + # Warn when a variable is used to initialise itself: + # int a = a; + flags="$flags -Winit-self" + fi + if [ $cc_version -ge 40 ]; then # GCC 4.0+ complains about that we break strict-aliasing. # On most places we don't see how to fix it, and it doesn't |