cvt.c (convert_to_reference): Check for both error_mark_node and NULL_NODE after call to...

* cvt.c (convert_to_reference): Check for both error_mark_node
	and NULL_NODE after call to convert_for_initialization.

From-SVN: r24373
This commit is contained in:
DJ Delorie 1998-12-18 11:50:30 +00:00 committed by Jason Merrill
parent bbcec10538
commit 09ad291704
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
1998-12-18 DJ Delorie <dj@cygnus.com>
* cvt.c (convert_to_reference): Check for both error_mark_node
and NULL_NODE after call to convert_for_initialization.
1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
* error.c (interesting_scope_p): New fn.

View file

@ -506,8 +506,8 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
{
rval = convert_for_initialization (NULL_TREE, type, expr, flags,
"converting", 0, 0);
if (rval == error_mark_node)
return error_mark_node;
if (rval == NULL_TREE || rval == error_mark_node)
return rval;
rval = build_up_reference (reftype, rval, flags);
if (rval && ! CP_TYPE_CONST_P (TREE_TYPE (reftype)))