Commit cdfc2f2b by Volker Reichelt Committed by Volker Reichelt

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
parent 0c8ce11b
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 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. * name-lookup.c (lookup_name_real): Merge two if's.
2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
......
...@@ -993,12 +993,7 @@ process_init_constructor_union (tree type, tree init) ...@@ -993,12 +993,7 @@ process_init_constructor_union (tree type, tree init)
tree field = TYPE_FIELDS (type); tree field = TYPE_FIELDS (type);
while (field && (!DECL_NAME (field) || TREE_CODE (field) != FIELD_DECL)) while (field && (!DECL_NAME (field) || TREE_CODE (field) != FIELD_DECL))
field = TREE_CHAIN (field); field = TREE_CHAIN (field);
if (!field) gcc_assert (field);
{
error ("union %qT with no named members cannot be initialized",
type);
ce->value = error_mark_node;
}
ce->index = field; ce->index = field;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment