(process_init_constructor): When initializing a union,
handle the case of an empty init list. From-SVN: r2507
This commit is contained in:
parent
e8db4813db
commit
c2f4acb703
|
@ -5202,6 +5202,12 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
|
|||
|
||||
/* For a union, get the initializer for 1 fld. */
|
||||
|
||||
if (tail == 0)
|
||||
{
|
||||
error ("empty initializer for union");
|
||||
tail = build_tree_list (0, 0);
|
||||
}
|
||||
|
||||
/* If this element specifies a field, initialize via that field. */
|
||||
if (TREE_PURPOSE (tail) != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue