(build_cplus_new): Make sure that what we return is of the right type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27063
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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);
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;