From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23638 invoked by alias); 9 Sep 2008 15:26:57 -0000 Received: (qmail 23624 invoked by uid 22791); 9 Sep 2008 15:26:56 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Sep 2008 15:26:09 +0000 Received: (qmail 18860 invoked from network); 9 Sep 2008 15:26:08 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Sep 2008 15:26:08 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: gnu-nat.c, compile it without -Werror Date: Tue, 09 Sep 2008 15:26:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_OWpxIo8tbx2VOZN" Message-Id: <200809091626.06394.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: 2008-09/txt/msg00184.txt.bz2 --Boundary-00=_OWpxIo8tbx2VOZN Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 492 Building gnu-nat.c fails with: ../../src/gdb/gnu-nat.c: In function 'inf_set_traced': ../../src/gdb/gnu-nat.c:884: error: suggest parentheses around assignment used as truth value ../../src/gdb/gnu-nat.c:884: error: suggest parentheses around assignment used as truth value ../../src/gdb/gnu-nat.c: In function 'inf_signal': (... a few more instances of the same ...) Turns out that warning comes from the definition of HURD_MSGPORT_RPC, a 20+ lines system macro... OK? -- Pedro Alves --Boundary-00=_OWpxIo8tbx2VOZN Content-Type: text/x-diff; charset="utf-8"; name="hurd_werror.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hurd_werror.diff" Content-length: 955 2008-09-09 Pedro Alves * Makefile.in (gnu-nat.o): New rule. --- gdb/Makefile.in | 7 +++++++ 1 file changed, 7 insertions(+) Index: src/gdb/Makefile.in =================================================================== --- src.orig/gdb/Makefile.in 2008-09-09 16:18:48.000000000 +0100 +++ src/gdb/Makefile.in 2008-09-09 16:23:30.000000000 +0100 @@ -1363,6 +1363,13 @@ monitor.o: $(srcdir)/monitor.c $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c $(POSTCOMPILE) +# "gnu-nat.c" gets "suggest parentheses around assignment used as +# truth value" errors. It turns out that there is a system header +# that does `if (a = b)'. +gnu-nat.o: $(srcdir)/gnu-nat.c + $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/gnu-nat.c + $(POSTCOMPILE) + # Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually # checks format strings. printcmd.o: $(srcdir)/printcmd.c --Boundary-00=_OWpxIo8tbx2VOZN--