Commit 77bffd4c by Steve Ellcey Committed by Steve Ellcey

re PR c++/28291 (ICE on invalid designated initializer)

	PR c++/28291
	* decl.c (reshape_init_class): Return error_mark_node on error.

From-SVN: r115523
parent 81a5e952
2006-07-17 Steve Ellcey <sje@cup.hp.com>
PR c++/28291
* decl.c (reshape_init_class): Return error_mark_node on error.
2006-07-17 Steve Ellcey <sje@cup.hp.com>
PR c++/28304
* decl2.c (check_classfn): Return NULL_TREE on error.
......
......@@ -4505,8 +4505,11 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p)
field = lookup_field_1 (type, d->cur->index, /*want_type=*/false);
if (!field || TREE_CODE (field) != FIELD_DECL)
{
error ("%qT has no non-static data member named %qD", type,
d->cur->index);
return error_mark_node;
}
}
/* If we processed all the member of the class, we are done. */
......
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