Commit 06126ca2 by Jason Merrill Committed by Jason Merrill

tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.

	* tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
	(build_cplus_new): Make sure that what we return is of the right type.

From-SVN: r27063
parent 87533b37
1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
(build_cplus_new): Make sure that what we return is of the right type.
1999-05-20 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (make_ptrmem_cst): New function.
......
......@@ -71,6 +71,7 @@ lvalue_p_1 (ref, treat_class_rvalues_as_lvalues)
case WITH_CLEANUP_EXPR:
case REALPART_EXPR:
case IMAGPART_EXPR:
case NOP_EXPR:
return lvalue_p_1 (TREE_OPERAND (ref, 0),
treat_class_rvalues_as_lvalues);
......@@ -193,7 +194,7 @@ build_cplus_new (type, init)
tree rval;
if (TREE_CODE (init) != CALL_EXPR && TREE_CODE (init) != AGGR_INIT_EXPR)
return init;
return convert (type, init);
slot = build (VAR_DECL, type);
DECL_ARTIFICIAL (slot) = 1;
......
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