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

This commit is contained in:
smatz 2010-10-31 14:25:57 +00:00
parent 063931d435
commit a1a2335f41

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