pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more closely mimics the behavior in parse.y.
* 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. From-SVN: r18618
This commit is contained in:
parent
1d8eaa6b15
commit
544c188d00
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
|
@ -4553,11 +4553,12 @@ tsubst_copy (t, args, in_decl)
|
|||
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;
|
||||
|
@ -4841,7 +4842,7 @@ tsubst_expr (t, args, in_decl)
|
|||
tsubst_expr (substmt, args, in_decl);
|
||||
|
||||
if (COMPOUND_STMT_NO_SCOPE (t) == 0)
|
||||
do_poplevel ();
|
||||
return do_poplevel ();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue