mirror of https://github.com/OpenTTD/OpenTTD
(svn r21062) -Codechange: append -Winit-self to compiler flags
parent
7e48d85104
commit
1517997868
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue