re PR c++/9623 (named initializer regression)

PR c++/9623
        * decl.c (reshape_init): Don't mess with initializer labels.

From-SVN: r63045
This commit is contained in:
Jason Merrill 2003-02-18 13:16:40 -05:00 committed by Jason Merrill
parent a6bd211dbf
commit 04b0308574
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-02-18 Jason Merrill <jason@redhat.com>
PR c++/9623
* decl.c (reshape_init): Don't mess with initializer labels.
2003-02-18 Ben Elliston <bje@redhat.com>
PR other/7350

View File

@ -7638,6 +7638,7 @@ reshape_init (tree type, tree *initp)
{
/* Loop through the initializable fields, gathering
initializers. */
/* FIXME support non-trivial labeled initializers. */
while (*initp && field)
{
tree field_init;
@ -7652,8 +7653,6 @@ reshape_init (tree type, tree *initp)
initializer for the first member of the union. */
if (TREE_CODE (type) == UNION_TYPE)
break;
if (TREE_PURPOSE (field_init))
field = TREE_PURPOSE (field_init);
field = next_initializable_field (TREE_CHAIN (field));
}
}

View File

@ -0,0 +1,5 @@
// PR c++/9623
// Test for trivial use of named initializer extension
struct S { int x; int y; };
S s = { x:1, y:2 };