1
0
Fork 0

(svn r21062) -Codechange: append -Winit-self to compiler flags

release/1.1
smatz 2010-10-31 14:25:57 +00:00
parent 7e48d85104
commit 1517997868
1 changed files with 6 additions and 0 deletions

View File

@ -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