From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20153 invoked by alias); 18 Jan 2008 19:03:31 -0000 Received: (qmail 19977 invoked by uid 48); 18 Jan 2008 19:02:48 -0000 Date: Fri, 18 Jan 2008 19:30:00 -0000 Message-ID: <20080118190248.19976.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/32102] -Wall stomps on -Wstrict-overflow In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg01989.txt.bz2 ------- Comment #5 from manu at gcc dot gnu dot org 2008-01-18 19:02 ------- (In reply to comment #4) > I think then -Wall shouldn't enable -Wstrict-overflow at all. Because current > situation is counter intuitive. > This a bug. A quick fix is: Index: gcc/c-opts.c =================================================================== --- gcc/c-opts.c (revision 131530) +++ gcc/c-opts.c (working copy) @@ -403,7 +403,8 @@ warn_switch = value; set_Wstrict_aliasing (value); warn_address = value; - warn_strict_overflow = value; + if (warn_strict_overflow < 2) + warn_strict_overflow = value; warn_array_bounds = value; /* Only warn about unknown pragmas that are not in system As you can see above, the same happens for other options, e.g., -Wstrict-aliasing=2 -Wall. My proposal to fix this is here: http://gcc.gnu.org/ml/gcc/2007-05/msg00719.html http://gcc.gnu.org/ml/gcc/2007-05/msg00724.html -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-01-18 19:02:48 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32102