This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24065] New: "Designated (dot) Initializers" with "Unnamed struct/union fields within structs/unions"
- From: "benoit dot guerin at thomson dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2005 12:05:18 -0000
- Subject: [Bug c/24065] New: "Designated (dot) Initializers" with "Unnamed struct/union fields within structs/unions"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
"Designated (dot) Initializers" and "Unnamed struct/union fields" are regular
constructs in gcc, though, they connot be parsed together.
(tested up to gcc 3.3.3)
typedef struct {
union {
long MV;
int mv[2];
struct {
int x;
int y;
};
};
int z;
}foo_t;
foo_t foo[2] = {
{
.z=2,
.mv={0,1},
},
{
.z=5,
.y=4,
.x=3,
},
};
foo_t foo2[2]= {
{.z=2,.MV=0x00010000},
{.z=5,.MV=0x00030002},
};
--
Summary: "Designated (dot) Initializers" with "Unnamed
struct/union fields within structs/unions"
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: benoit dot guerin at thomson dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24065