[Bug c/58303] C99 union initializers new union members clobber earlier data
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 3 06:27:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58303
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
An initializer for an union is a single value. In C89, only the first member
of a union can be initialized; in C99/C11 you can use the designated
initializers to specify which member to initialize, but still only a single
member of an union can be initialized.
More information about the Gcc-bugs
mailing list