This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14374] valid unamed struct in a union rejected by gcc
- From: "ahs3 at fc dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2004 01:10:34 -0000
- Subject: [Bug c/14374] valid unamed struct in a union rejected by gcc
- References: <20040301221504.14374.ahs3@fc.hp.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ahs3 at fc dot hp dot com 2004-03-02 01:10 -------
(In reply to comment #6)
> The unnamed members in 6.2.5 refer to unnamed bit-fields. A /declarator/,
> which is only optional for bit-fields, always contains a name. Furthermore:
>
> 6.7.2.1#7: ... If the struct-declaration-list contains no named members, the
> behavior is undefined.
Excellent. That's exactly what I needed to know. It is indeed invalid code.
Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14374