From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6579 invoked by alias); 3 Jan 2007 18:47:22 -0000 Received: (qmail 6564 invoked by uid 22791); 3 Jan 2007 18:47:20 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 03 Jan 2007 18:47:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H2B8q-0005K6-Hb; Wed, 03 Jan 2007 13:47:12 -0500 Date: Wed, 03 Jan 2007 18:47:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org Subject: Re: RFC: Warning fixes Message-ID: <20070103184712.GF17935@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , mark.kettenis@xs4all.nl, gdb-patches@sourceware.org References: <20061228195828.GA18628@nevyn.them.org> <200612282256.kBSMu65R022410@brahms.sibelius.xs4all.nl> <20061228230925.GA23775@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00072.txt.bz2 On Fri, Dec 29, 2006 at 02:15:01PM +0200, Eli Zaretskii wrote: > > Date: Thu, 28 Dec 2006 18:09:26 -0500 > > From: Daniel Jacobowitz > > Cc: gdb-patches@sourceware.org > > > > The warning is a bit annoying, though. We can't portably tell whether > > the type of sig will be signed or unsigned. Perhaps we should force > > sig to be an int before bounds checking, instead, and I should file a > > GCC bug report. How's that sound to you? > > A GCC bug report is in order, I agree: the compiler shouldn't punish > the programmer for its choice of data type. I filed the moral equivalent of a bug report by asking Joseph (C front end maintainer) about this. His reply was: > This sort of thing is why such warnings belong in -Wextra not -Wall. > (And not on unconditionally, as some such warnings are.) So the warning is performing quirkily as designed, and we have a choice whether to adapt our code to GCC's periodic quirks to use -Wextra, or to avoid -Wextra. We decided, in the thread following my other patch, to avoid it. I'm going to check in the fix for this one anyway, since it's just a single cast, in case someone wants to survey the results with -Wextra for another target later. I'm sure it will have plenty to complain about. -- Daniel Jacobowitz CodeSourcery