This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4640: latest gcc produces new error on previously accepted code
- To: fnf at ninemoons dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Subject: Re: c/4640: latest gcc produces new error on previously accepted code
- From: dj at gcc dot gnu dot org
- Date: 1 Nov 2001 23:48:07 -0000
Synopsis: latest gcc produces new error on previously accepted code
State-Changed-From-To: open->closed
State-Changed-By: dj
State-Changed-When: Thu Nov 1 15:48:07 2001
State-Changed-Why:
In the example given, the enum is doing more than just
creating the enumerations. It is also allocating space in
the struct, because it is creating a field even though
there is no name. It is because it is creating a field
that it is not allowed; such enums as your example expects
should be outside the struct. The original patch that
enabled these unnammed enums was intended to provide
MSVC compatibility for nested unnamed structs and unions.
It was never intended to allow other types of unnamed
fields.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4640&database=gcc