mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r21062) -Codechange: append -Winit-self to compiler flags
This commit is contained in:
parent
063931d435
commit
a1a2335f41
@ -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
Block a user