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]

c/10676: Using unnamed fields in initializers


>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:


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