From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12390 invoked by alias); 31 Aug 2010 20:15:38 -0000 Received: (qmail 12379 invoked by uid 22791); 31 Aug 2010 20:15:35 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 20:15:30 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7VKExfN011906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 Aug 2010 16:14:59 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7VKEu9q013051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Aug 2010 16:14:58 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o7VKEuK3006478; Tue, 31 Aug 2010 22:14:56 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o7VKEt5W006477; Tue, 31 Aug 2010 22:14:55 +0200 Date: Tue, 31 Aug 2010 20:15:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [commit] Build memmem with -Wno-error. Message-ID: <20100831201455.GA24500@host1.dyn.jankratochvil.net> References: <1283281706-30409-1-git-send-email-brobecker@adacore.com> <201008312048.35034.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201008312048.35034.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-08/txt/msg00575.txt.bz2 On Tue, 31 Aug 2010 21:48:34 +0200, Pedro Alves wrote: > It would be better to come up with > an $(INTERNAL_CFLAGS) variant that does not include -Werror in the first > place, and use that instead in the memmem.o rule. gdb/Makefile.in uses > INTERNAL_WARN_CFLAGS for exactly that. I suggest to do the same here. Take > a look at the monitor.o rule in gdb/Makefile.in. This is a longterm cosmetic problem. Anytime I modify anything in defs.h VIM jumps to the warnings in monitor.c which I have to skip. There should be the explicit -Wno-format-nonliteral form. Just removing -Wformat-nonliteral or -Werror is not enough. Combined the patch together with making it more restrictive. It should no longer be IMO such a concern since Joel started removing -Werror for releases. Tested compilation on x86_64-fedora14snapshot-linux-gnu. Thanks, Jan gdb/ 2010-08-31 Jan Kratochvil * Makefile.in (GDB_WARN_CFLAGS_NO_FORMAT): Convert it to the no- form. (monitor.o): Replace $(INTERNAL_WARN_CFLAGS) by $(INTERNAL_CFLAGS) and add $(GDB_WARN_CFLAGS_NO_FORMAT). (printcmd.o): Replace $(INTERNAL_CFLAGS_BASE) by $(INTERNAL_CFLAGS). --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -155,7 +155,8 @@ WERROR_CFLAGS = @WERROR_CFLAGS@ GDB_WARN_CFLAGS = $(WARN_CFLAGS) GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) -GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " | sed "s/ -Wformat-nonliteral / /g"` +GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \ + | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"` RDYNAMIC = @RDYNAMIC@ @@ -1531,14 +1532,15 @@ main.o: $(srcdir)/main.c # definitly will not work. "monitor.c" needs to be rewritten so that # it doesn't use format strings and instead uses callbacks. monitor.o: $(srcdir)/monitor.c - $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c + $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \ + $(COMPILE.post) $(srcdir)/monitor.c $(POSTCOMPILE) # Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually # checks format strings. printcmd.o: $(srcdir)/printcmd.c - $(COMPILE.pre) $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS_NO_FORMAT) \ - $(GDB_WERROR_CFLAGS) $(COMPILE.post) $(srcdir)/printcmd.c + $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \ + $(COMPILE.post) $(srcdir)/printcmd.c $(POSTCOMPILE) # Message files. Based on code in gcc/Makefile.in.