aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-20 21:26:06 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-20 21:26:06 +0000
commit447cfcb9e12b13e75072f4774bc4579998513a6a (patch)
tree6e40d5372fb2d68b923e86b1e69f592b51bfac53 /gcc/cp
parentea003f6d7c5c6c58661582cd6d040202a176e888 (diff)
downloadgcc-447cfcb9e12b13e75072f4774bc4579998513a6a.zip
gcc-447cfcb9e12b13e75072f4774bc4579998513a6a.tar.gz
gcc-447cfcb9e12b13e75072f4774bc4579998513a6a.tar.bz2
cp-tree.h (finish_stmt_expr): Change prototype.
* cp-tree.h (finish_stmt_expr): Change prototype. * expr.c (cplus_expand_expr): Adjust call accordingly. * init.c (finish_init_stmts): Likewise. * parse.y (primary): Likewise. * pt.c (tsubst_copy): Likewise. * semantics.c (finish_stmt_expr): Don't take two parameters. Don't remove generated BLOCKs from the block-tree. From-SVN: r29533
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/expr.c4
-rw-r--r--gcc/cp/init.c6
-rw-r--r--gcc/cp/parse.y2
-rw-r--r--gcc/cp/pt.c6
6 files changed, 17 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5f0bce0..624e01c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,13 @@
1999-09-20 Mark Mitchell <mark@codesourcery.com>
+ * cp-tree.h (finish_stmt_expr): Change prototype.
+ * expr.c (cplus_expand_expr): Adjust call accordingly.
+ * init.c (finish_init_stmts): Likewise.
+ * parse.y (primary): Likewise.
+ * pt.c (tsubst_copy): Likewise.
+ * semantics.c (finish_stmt_expr): Don't take two parameters.
+ Don't remove generated BLOCKs from the block-tree.
+
Remove support for assigning to `this'.
* NEWS: Note that fact.
* class.c (build_vbase_path): Don't check flag_this_is_variable.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 9a55744..8744b7f 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3674,7 +3674,7 @@ extern void finish_label_decl PROTO((tree));
extern void finish_subobject PROTO((tree));
extern tree finish_parenthesized_expr PROTO((tree));
extern tree begin_stmt_expr PROTO((void));
-extern tree finish_stmt_expr PROTO((tree, tree));
+extern tree finish_stmt_expr PROTO((tree));
extern tree finish_call_expr PROTO((tree, tree, int));
extern tree finish_increment_expr PROTO((tree, enum tree_code));
extern tree finish_this_expr PROTO((void));
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 1f38649..0eb5de4 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -245,8 +245,8 @@ cplus_expand_expr (exp, target, tmode, modifier)
case STMT_EXPR:
{
tree rtl_expr = begin_stmt_expr ();
- tree block = expand_stmt (STMT_EXPR_STMT (exp));
- finish_stmt_expr (rtl_expr, block);
+ expand_stmt (STMT_EXPR_STMT (exp));
+ finish_stmt_expr (rtl_expr);
return expand_expr (rtl_expr, target, tmode, modifier);
}
break;
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 11b96c4..c98324e 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -990,10 +990,8 @@ finish_init_stmts (stmt_expr, compound_stmt)
tree compound_stmt;
{
pop_momentary ();
- stmt_expr
- = finish_stmt_expr (stmt_expr,
- finish_compound_stmt (/*has_no_scope=*/1,
- compound_stmt));
+ finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
+ stmt_expr = finish_stmt_expr (stmt_expr);
/* To avoid spurious warnings about unused values, we set
TREE_USED. */
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index ce697d4..c3892ed 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -1446,7 +1446,7 @@ primary:
$<ttype>$ = begin_stmt_expr ();
}
compstmt ')'
- { $$ = finish_stmt_expr ($<ttype>2, $3); }
+ { $$ = finish_stmt_expr ($<ttype>2); }
/* Koenig lookup support
We could store lastiddecl in $1 to avoid another lookup,
but that would result in many additional reduce/reduce conflicts. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index e7f35fa..3fca3d87 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7085,9 +7085,9 @@ tsubst_copy (t, args, complain, in_decl)
if (!processing_template_decl)
{
tree rtl_expr = begin_stmt_expr ();
- tree block = tsubst_expr (STMT_EXPR_STMT (t), args,
- complain, in_decl);
- return finish_stmt_expr (rtl_expr, block);
+ tsubst_expr (STMT_EXPR_STMT (t), args,
+ complain, in_decl);
+ return finish_stmt_expr (rtl_expr);
}
return t;