+Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
+ closely mimics the behavior in parse.y.
+ (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
+ into a compound statement.
+
Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
build_expr_from_tree. So, we need to expand the
BIND_EXPR here. */
tree rtl_exp = expand_start_stmt_expr();
- tsubst_expr (TREE_OPERAND (r, 1), args, in_decl);
+ tree block = tsubst_expr (TREE_OPERAND (r, 1), args, in_decl);
rtl_exp = expand_end_stmt_expr (rtl_exp);
TREE_SIDE_EFFECTS (rtl_exp) = 1;
- return build (BIND_EXPR, TREE_TYPE (rtl_exp),
- NULL_TREE, rtl_exp, TREE_OPERAND (r, 2));
+ r = build (BIND_EXPR, TREE_TYPE (rtl_exp),
+ NULL_TREE, rtl_exp, block);
+ delete_block (block);
}
return r;
tsubst_expr (substmt, args, in_decl);
if (COMPOUND_STMT_NO_SCOPE (t) == 0)
- do_poplevel ();
+ return do_poplevel ();
}
break;