From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24167 invoked by alias); 30 Dec 2006 15:32:40 -0000 Received: (qmail 24159 invoked by uid 22791); 30 Dec 2006 15:32:40 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 30 Dec 2006 15:32:34 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-229-225-74.inter.net.il [84.229.225.74]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FPF42150 (AUTH halo1); Sat, 30 Dec 2006 17:32:25 +0200 (IST) Date: Sat, 30 Dec 2006 15:32:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: gdb-patches@sourceware.org In-reply-to: <20061229210206.GA23681@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 29 Dec 2006 16:02:06 -0500) Subject: Re: RFC: Use -Wall -Wextra Reply-to: Eli Zaretskii References: <20061228195533.GA18492@nevyn.them.org> <20061229135814.GA9741@nevyn.them.org> <20061229210206.GA23681@nevyn.them.org> 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/msg00359.txt.bz2 > Date: Fri, 29 Dec 2006 16:02:06 -0500 > From: Daniel Jacobowitz > Cc: gdb-patches@sourceware.org > > How about -Wall without -Wextra then? Fine with me. > 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! > > gcc -c -g -O2 -I. -I. -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -DMI_OUT=1 -DTUI=1 -Wall -Wextra -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-switch -Wno-missing-field-initializers -Werror infrun.c > > cc1: warnings being treated as errors > > infrun.c: In function 'handle_inferior_event': > > infrun.c:1458: warning: statement with no effect > > make[2]: *** [infrun.o] Error 1 > > 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.