typeck2.c (process_init_constructor_union): Remove check for unnamed union members.

* typeck2.c (process_init_constructor_union): Remove check for
	unnamed union members.

From-SVN: r107501
This commit is contained in:
Volker Reichelt 2005-11-25 12:52:12 +00:00 committed by Volker Reichelt
parent 0c8ce11b78
commit cdfc2f2b34
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* typeck2.c (process_init_constructor_union): Remove check for
unnamed union members.
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* name-lookup.c (lookup_name_real): Merge two if's.

View File

@ -993,12 +993,7 @@ process_init_constructor_union (tree type, tree init)
tree field = TYPE_FIELDS (type);
while (field && (!DECL_NAME (field) || TREE_CODE (field) != FIELD_DECL))
field = TREE_CHAIN (field);
if (!field)
{
error ("union %qT with no named members cannot be initialized",
type);
ce->value = error_mark_node;
}
gcc_assert (field);
ce->index = field;
}