From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30062 invoked by alias); 30 Dec 2006 16:00:41 -0000 Received: (qmail 30052 invoked by uid 22791); 30 Dec 2006 16:00:41 -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; Sat, 30 Dec 2006 16:00:36 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H0gdO-0004Qz-BM; Sat, 30 Dec 2006 11:00:34 -0500 Date: Sat, 30 Dec 2006 16:00:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: RFC: Use -Wall -Wextra Message-ID: <20061230160034.GE15107@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sourceware.org References: <20061228195533.GA18492@nevyn.them.org> <20061229135814.GA9741@nevyn.them.org> <20061229210206.GA23681@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: 2006-12/txt/msg00363.txt.bz2 On Sat, Dec 30, 2006 at 05:32:26PM +0200, Eli Zaretskii wrote: > > I think neither of us is actually talking about -Walways-true. > > Maybe. I was talking about this one (happens with yesterday's > snapshot): > > gcc -c -DHAVE_CONFIG_H -I. -I.././readline -DRL_LIBRARY_VERSION='"5.1"' -g -O2 bind.c > bind.c: In function 'rl_function_of_keyseq': > bind.c:682: warning: comparison is always true due to limited range of data type > rm -f display.o > gcc -c -DHAVE_CONFIG_H -I. -I.././readline -DRL_LIBRARY_VERSION='"5.1"' -g -O2 display.c > display.c: In function 'rl_character_len': > display.c:1844: warning: comparison is always true due to limited range of data type > > It looks like this happens even without -Wall. What a screwup! OK, that's a whole different one - and yes, it's unconditional. I meant this one: warning: comparison of unsigned expression >= 0 is always true That's controlled by -Wextra directly. Anyway, let's go with -Wall; that's still an improvement over the present state and fixes the annoying -Wuninitialized warnings. I'll commit my saved up warning fixes, and then post a patch to do this. > > Thanks. That comes from the default definition of a macro which no > > longer has any non-default definitions; we may as well garbage collect > > it. I don't know why I didn't get the warning; I can provoke it for > > a small testcase. > > > > I'll remove the macro, since that's an unrelated cleanup. > > I'll wait for the patch, thanks. Done now, in a separate message. -- Daniel Jacobowitz CodeSourcery