This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/10676: Using unnamed fields in initializers
- From: marcus at gnu dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 8 May 2003 02:17:56 -0000
- Subject: c/10676: Using unnamed fields in initializers
- Reply-to: marcus at gnu dot org
>Number: 10676
>Category: c
>Synopsis: Using unnamed fields in initializers
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu May 08 02:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: marcus@gnu.org
>Release: gcc (GCC) 3.2.2 20030124 (Debian prerelease)
>Organization:
>Environment:
Debian GNU/Linux i386-linux-gnu
>Description:
union
{
int raw;
struct
{
int foo;
};
} baz = { .raw = 0 }, /* OK */
zab = { .foo = 1 }; /* unknown field `foo' specified in initializer */
Unnamed unions/structs are very useful. If the initializer for zab were valid, they would be even more useful.
Thanks for your consideration,
Marcus
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: