[commit] language.h minor cleanup
Mon Dec 17 13:31:00 GMT 2007
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.
A type specifier of the form
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.
More information about the Gdb-patches