From 15179978686721cfc9f51c1b8f2d6b95ae009492 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 31 Oct 2010 14:25:57 +0000 Subject: (svn r21062) -Codechange: append -Winit-self to compiler flags --- config.lib | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config.lib') 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 -- cgit v1.2.3-54-g00ecf