This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/52182] unnamed structs/unions are supported by ISO C99


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]