Commit 953360c8 by Mark Mitchell Committed by Mark Mitchell

cvt.c (ocp_convert): Avoid infinite recursion caused by 1998-10-03 change.

	* cvt.c (ocp_convert): Avoid infinite recursion caused by
	1998-10-03 change.

From-SVN: r22958
parent 297a6bfc
1998-10-09 Mark Mitchell <mark@markmitchell.com>
* cvt.c (ocp_convert): Avoid infinite recursion caused by
1998-10-03 change.
1998-10-08 Jason Merrill <jason@yorick.cygnus.com> 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (resolve_overloaded_unification): New fn. * pt.c (resolve_overloaded_unification): New fn.
......
...@@ -679,12 +679,12 @@ ocp_convert (type, expr, convtype, flags) ...@@ -679,12 +679,12 @@ ocp_convert (type, expr, convtype, flags)
/* The call to fold will not always remove the NOP_EXPR as /* The call to fold will not always remove the NOP_EXPR as
might be expected, since if one of the types is a typedef; might be expected, since if one of the types is a typedef;
the comparsion in fold is just equality of pointers, not a the comparsion in fold is just equality of pointers, not a
call to comptypes. */ call to comptypes. We don't call fold in this case because
; that can result in infinite recursion; fold will call
convert, which will call ocp_convert, etc. */
return e;
else else
e = build1 (NOP_EXPR, type, e); return fold (build1 (NOP_EXPR, type, e));
return fold (e);
} }
if (code == VOID_TYPE && (convtype & CONV_STATIC)) if (code == VOID_TYPE && (convtype & CONV_STATIC))
......
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