This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52182] unnamed structs/unions are supported by ISO C99
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2012 17:23:59 +0000
- Subject: [Bug c/52182] unnamed structs/unions are supported by ISO C99
- Auto-submitted: auto-generated
- References: <bug-52182-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52182
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-02-09 17:23:59 UTC ---
On Thu, 9 Feb 2012, jan.kratochvil at redhat dot com wrote:
> But ISO C99 says:
> A structure type describes a sequentially allocated nonempty set of member
> objects (and, in certain circumstances, an incomplete array), each of which
> has an optionally specified name and possibly distinct type.
> ^^^^^^^^^^^^^^^^^^^^^^^^^
The name is only optional for bit-fields. See the syntax for
struct-declaration and struct-declarator. The difference in C11 is that a
struct-declarator-list is optional in a struct-declaration.