From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1669 invoked by alias); 2 Jul 2013 20:53:30 -0000 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 Received: (qmail 1659 invoked by uid 89); 2 Jul 2013 20:53:30 -0000 X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 02 Jul 2013 20:53:29 +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.14.4/8.14.4) with ESMTP id r62KrSYN002295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Jul 2013 16:53:28 -0400 Received: from barimba (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r62KrQmQ009214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 2 Jul 2013 16:53:27 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: Build regression on CentOS-5 [Re: [PATCH 3/3] add -Wold-style-definition] References: <1371494572-26594-1-git-send-email-tromey@redhat.com> <1371494572-26594-4-git-send-email-tromey@redhat.com> <20130702080754.GA24111@host2.jankratochvil.net> Date: Tue, 02 Jul 2013 20:53:00 -0000 In-Reply-To: <20130702080754.GA24111@host2.jankratochvil.net> (Jan Kratochvil's message of "Tue, 2 Jul 2013 10:07:54 +0200") Message-ID: <87hagcela1.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00095.txt.bz2 Jan> cc1: warnings being treated as errors Jan> In file included from ada-exp.y:770: Jan> ada-lex.c: In function 'yy_get_next_buffer': Jan> ada-lex.c:1444: warning: old-style function definition Jan> ada-lex.c: In function 'yy_get_previous_state': Jan> ada-lex.c:1576: warning: old-style function definition Thanks. As much as I dislike working around old tools, how about the appended? Tom diff --git a/gdb/Makefile.in b/gdb/Makefile.in index aca5dbf..a6a6c3e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -165,6 +165,8 @@ GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \ | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"` +GDB_WARN_CFLAGS_NO_DEFS = `echo " $(GDB_WARN_CFLAGS) " \ + | sed "s/ -Wold-style-definition / /g"` RDYNAMIC = @RDYNAMIC@ @@ -1580,6 +1582,17 @@ printcmd.o: $(srcdir)/printcmd.c $(COMPILE.post) $(srcdir)/printcmd.c $(POSTCOMPILE) +# ada-exp.c can appear in srcdir, for releases; or in ., for +# development builds. +ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi` + +# Some versions of flex give output that triggers +# -Wold-style-definition. +ada-exp.o: ada-exp.c + $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_DEFS) \ + $(COMPILE.post) $(ADA_EXP_C) + $(POSTCOMPILE) + # Message files. Based on code in gcc/Makefile.in. # Rules for generating translated message descriptions. Disabled by