From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [commit] language.h minor cleanup
Date: Mon, 17 Dec 2007 13:31:00 -0000 [thread overview]
Message-ID: <20071217132851.GA23128@caradoc.them.org> (raw)
In-Reply-To: <20071217104547.GG9022@adacore.com>
On Mon, Dec 17, 2007 at 02:45:47PM +0400, Joel Brobecker wrote:
> > As far as I know the comment:
> >
> > > -/* enum exp_opcode; ANSI's `wisdom' didn't include forward enum decls. */
> >
> > is right, so you shouldn't have comitted this :(. Perhaps it is now a
> > GCC extension to allow these, but as far as I remember older versions
> > of GCC didn't accept this.
>
> I thought that we changed the requirement to C90 which should accept this.
> I was comforted in this direction by the fact that we already use this
> paradigm elsewhere so I thought it was OK.
Nope, sorry.
C99, 6.7.2.3#2:
A type specifier of the form
enum identifier
without an enumerator list shall only appear after the type it
specifies is complete.
drow@caradoc:~% gcc -c q.c -Wall -std=c99 -pedantic
q.c:1: warning: ISO C forbids forward references to `enum' types
If we use it elsewhere, we should stop.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-17 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 7:14 Joel Brobecker
2007-12-17 10:46 ` Mark Kettenis
2007-12-17 11:23 ` Joel Brobecker
2007-12-17 13:31 ` Daniel Jacobowitz [this message]
2007-12-17 14:22 ` Joel Brobecker
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=20071217132851.GA23128@caradoc.them.org \
--to=drow@false.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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