Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Build regression on CentOS-5  [Re: [PATCH 3/3] add -Wold-style-definition]
Date: Tue, 02 Jul 2013 20:53:00 -0000	[thread overview]
Message-ID: <87hagcela1.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20130702080754.GA24111@host2.jankratochvil.net> (Jan	Kratochvil's message of "Tue, 2 Jul 2013 10:07:54 +0200")

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


  reply	other threads:[~2013-07-02 20:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 18:42 [PATCH 0/3] add a few new warning options Tom Tromey
2013-06-17 18:42 ` [PATCH 1/3] add -Wmissing-parameter-type Tom Tromey
2013-06-17 18:42 ` [PATCH 2/3] add -Wold-style-declaration Tom Tromey
2013-07-01 19:49   ` Tom Tromey
2013-06-17 18:59 ` [PATCH 3/3] add -Wold-style-definition Tom Tromey
2013-07-02  8:08   ` Build regression on CentOS-5 [Re: [PATCH 3/3] add -Wold-style-definition] Jan Kratochvil
2013-07-02 20:53     ` Tom Tromey [this message]
2013-07-02 20:54       ` Tom Tromey
2013-07-03  9:00         ` Jan Kratochvil
2013-07-10 16:28           ` Tom Tromey
2013-07-10 16:51         ` Michael Eager
2013-07-10 18:11           ` Tom Tromey
2013-07-10 18:24             ` Joel Brobecker
2013-07-10 19:11               ` Michael Eager
2013-06-18  5:14 ` [PATCH 0/3] add a few new warning options Joel Brobecker
2013-07-01 19:46 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hagcela1.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox