Commit 98d64f69 by Richard Kenner Committed by Richard Kenner

c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.

	* c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.
	* c-typeck.c (convert_for_assignment): Likewise.

From-SVN: r33058
parent 29105cea
Mon Apr 10 07:21:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Mon Apr 10 07:21:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.
* c-typeck.c (convert_for_assignment): Likewise.
* expmed.c (init_expmed): Don't free objects we make. * expmed.c (init_expmed): Don't free objects we make.
* emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups. * emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups.
......
...@@ -88,7 +88,7 @@ convert (type, expr) ...@@ -88,7 +88,7 @@ convert (type, expr)
#endif #endif
if (code == INTEGER_TYPE || code == ENUMERAL_TYPE) if (code == INTEGER_TYPE || code == ENUMERAL_TYPE)
return fold (convert_to_integer (type, e)); return fold (convert_to_integer (type, e));
if (code == POINTER_TYPE) if (code == POINTER_TYPE || code == REFERENCE_TYPE)
return fold (convert_to_pointer (type, e)); return fold (convert_to_pointer (type, e));
if (code == REAL_TYPE) if (code == REAL_TYPE)
return fold (convert_to_real (type, e)); return fold (convert_to_real (type, e));
......
...@@ -4082,7 +4082,8 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) ...@@ -4082,7 +4082,8 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum)
} }
/* Conversions among pointers */ /* Conversions among pointers */
else if (codel == POINTER_TYPE && coder == POINTER_TYPE) else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE)
&& (coder == POINTER_TYPE || coder == REFERENCE_TYPE))
{ {
register tree ttl = TREE_TYPE (type); register tree ttl = TREE_TYPE (type);
register tree ttr = TREE_TYPE (rhstype); register tree ttr = TREE_TYPE (rhstype);
......
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