aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-06-26 02:18:14 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-06-26 02:18:14 +0000
commit596fd31c72350cdd6b4e283c6e8f2757220a7322 (patch)
tree52f7fe189833adff3c33803e82193be734e83e19 /gcc/cp
parentb42115f711f164a05b1e9f3ca5565eb74ab3964b (diff)
downloadgcc-596fd31c72350cdd6b4e283c6e8f2757220a7322.zip
gcc-596fd31c72350cdd6b4e283c6e8f2757220a7322.tar.gz
gcc-596fd31c72350cdd6b4e283c6e8f2757220a7322.tar.bz2
cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
* cp-tree.h (genrtl_begin_stmt_expr): Rename to ... (begin_global_stmt_expr): ... this. (genrtl_finish_stmt_expr): Rename to ... (finish_global_stmt_expr): ... this. * init.c (begin_init_stmts): Adjust calls. (finish_init_stmts): Likewise. * semantics.c (genrtl_begin_stmt_expr): Rename to ... (begin_global_stmt_expr): ... this. (genrtl_finish_stmt_expr): Rename to ... (finish_global_stmt_expr): ... this. From-SVN: r34702
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/init.c4
-rw-r--r--gcc/cp/semantics.c43
4 files changed, 37 insertions, 27 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 43c2803..854eb8f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2000-06-25 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
+ (begin_global_stmt_expr): ... this.
+ (genrtl_finish_stmt_expr): Rename to ...
+ (finish_global_stmt_expr): ... this.
+ * init.c (begin_init_stmts): Adjust calls.
+ (finish_init_stmts): Likewise.
+ * semantics.c (genrtl_begin_stmt_expr): Rename to ...
+ (begin_global_stmt_expr): ... this.
+ (genrtl_finish_stmt_expr): Rename to ...
+ (finish_global_stmt_expr): ... this.
+
2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* search.c (lookup_member): Fix typo in comment.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 03a90db..f7e3b07 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4535,8 +4535,8 @@ extern void genrtl_asm_stmt PARAMS ((tree, tree,
tree));
extern void genrtl_named_return_value PARAMS ((tree,
tree));
-extern tree genrtl_begin_stmt_expr PARAMS ((void));
-extern tree genrtl_finish_stmt_expr PARAMS ((tree));
+extern tree begin_global_stmt_expr PARAMS ((void));
+extern tree finish_global_stmt_expr PARAMS ((tree));
/* in spew.c */
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index cf480a4..00a9d73 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -100,7 +100,7 @@ begin_init_stmts (stmt_expr_p, compound_stmt_p)
if (building_stmt_tree ())
*stmt_expr_p = begin_stmt_expr ();
else
- *stmt_expr_p = genrtl_begin_stmt_expr ();
+ *stmt_expr_p = begin_global_stmt_expr ();
if (building_stmt_tree ())
*compound_stmt_p = begin_compound_stmt (/*has_no_scope=*/1);
@@ -125,7 +125,7 @@ finish_init_stmts (stmt_expr, compound_stmt)
if (building_stmt_tree ())
stmt_expr = finish_stmt_expr (stmt_expr);
else
- stmt_expr = genrtl_finish_stmt_expr (stmt_expr);
+ stmt_expr = finish_global_stmt_expr (stmt_expr);
/* To avoid spurious warnings about unused values, we set
TREE_USED. */
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 68dac42..aa95da8 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1776,21 +1776,6 @@ finish_parenthesized_expr (expr)
return expr;
}
-/* The last_tree will be NULL_TREE when entering this function. Unlike
- the other genrtl functions, in this function, that state can change
- hence the check at the end as in the original version of
- begin_stmt_expr. Generate the RTL for the start of a STMT_EXPR. */
-tree
-genrtl_begin_stmt_expr ()
-{
- if (! cfun && !last_tree)
- begin_stmt_tree (&scope_chain->x_saved_tree);
-
- keep_next_level (1);
-
- return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
-}
-
/* Begin a statement-expression. The value returned must be passed to
finish_stmt_expr. */
@@ -1811,22 +1796,34 @@ begin_stmt_expr ()
return last_tree;
}
-/* Generate the RTL for the end of the STMT_EXPR. */
+/* Used when beginning a statement-expression outside function scope.
+ For example, when handling a file-scope initializer, we use this
+ function. */
-tree
-genrtl_finish_stmt_expr (rtl_expr)
- tree rtl_expr;
+tree
+begin_global_stmt_expr ()
{
- tree result;
+ if (! cfun && !last_tree)
+ begin_stmt_tree (&scope_chain->x_saved_tree);
+
+ keep_next_level (1);
+
+ return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
+}
+
+/* Finish the STMT_EXPR last begun with begin_global_stmt_expr. */
- rtl_expr = expand_end_stmt_expr (rtl_expr);
- result = rtl_expr;
+tree
+finish_global_stmt_expr (stmt_expr)
+ tree stmt_expr;
+{
+ stmt_expr = expand_end_stmt_expr (stmt_expr);
if (! cfun
&& TREE_CHAIN (scope_chain->x_saved_tree) == NULL_TREE)
finish_stmt_tree (&scope_chain->x_saved_tree);
- return result;
+ return stmt_expr;
}
/* Finish a statement-expression. RTL_EXPR should be the value