(process_init_constructor): When initializing a union,

handle the case of an empty init list.

From-SVN: r2507
This commit is contained in:
Richard Stallman 1992-10-18 08:12:53 +00:00
parent e8db4813db
commit c2f4acb703
1 changed files with 6 additions and 0 deletions

View File

@ -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)
{