From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13141 invoked by alias); 31 Aug 2010 19:48:44 -0000 Received: (qmail 13130 invoked by uid 22791); 31 Aug 2010 19:48:43 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 19:48:39 +0000 Received: (qmail 21217 invoked from network); 31 Aug 2010 19:48:37 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Aug 2010 19:48:37 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [commit] Build memmem with -Wno-error. Date: Tue, 31 Aug 2010 19:48:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Joel Brobecker References: <1283281706-30409-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1283281706-30409-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008312048.35034.pedro@codesourcery.com> 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/msg00571.txt.bz2 On Tuesday 31 August 2010 20:08:26, Joel Brobecker wrote: > +# We build memmem.c with -Wno-error because this file is not under > +# our control. On LynxOS, the compiler generates some warnings > +# because str-two-way.h uses a constant (MAX_SIZE) whose definition > +# makes it ambiguous whether it is signed or unsigned ("warning: this > +# decimal constant is unsigned only in ISO C90"). > memmem.o: ../gnulib/memmem.c > - $(CC) -o memmem.o -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< > + $(CC) -o memmem.o -c $(CPPFLAGS) $(INTERNAL_CFLAGS) -Wno-error $< Sorry, I didn't realize you were talking about "-Wno-error" literally. This may break non-gcc compilers. 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. -- Pedro Alves