aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-04-17 01:47:36 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-04-17 01:47:36 +0000
commitb2123dc0d8b3c18313c9aae7bddf57af0b4a6bf7 (patch)
tree945ba924fcaf4c9312b124d4f9724e8c510bc166 /gcc/cp
parentf0871dfe8ff3366c0404f151a722fc5de3f614c7 (diff)
downloadgcc-b2123dc0d8b3c18313c9aae7bddf57af0b4a6bf7.zip
gcc-b2123dc0d8b3c18313c9aae7bddf57af0b4a6bf7.tar.gz
gcc-b2123dc0d8b3c18313c9aae7bddf57af0b4a6bf7.tar.bz2
c-common.h (STMT_EXPR_NO_SCOPE): New macro.
* c-common.h (STMT_EXPR_NO_SCOPE): New macro. * c-common.c (c_expand_expr): Respect STMT_EXPR_NO_SCOPE. * tree.h (expand_start_stmt_expr): Update prototype. * stmt.c (expand_start_stmt_expr): Add has_scope parameter. * tree-inline.c (expand_call_inline): Set STMT_EXPR_NO_SCOPE on the STMT_EXPR created for the inline function. * trans.c (tree_transform): Add has_scope argument to expand_start_stmt_expr. * com.c (ffecom_expr_power_integer): Add has_scope argument to call to expand_start_stmt_expr. * init.c (begin_init_stmts): Remove commented out code. (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. * semantics.c (begin_gobal_stmt_expr): Adjust call to expand_start_stmt_expr. From-SVN: r52395
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/init.c9
-rw-r--r--gcc/cp/semantics.c2
3 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d19ea37..4f41e4f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-16 Mark Mitchell <mark@codesourcery.com>
+
+ * init.c (begin_init_stmts): Remove commented out code.
+ (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
+ * semantics.c (begin_gobal_stmt_expr): Adjust call to
+ expand_start_stmt_expr.
+
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (register_dtor_fn): Pass the address of dso_handle, not
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 2143af4..49ecf7c 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -77,10 +77,6 @@ begin_init_stmts (stmt_expr_p, compound_stmt_p)
if (building_stmt_tree ())
*compound_stmt_p = begin_compound_stmt (/*has_no_scope=*/1);
- /*
- else
- *compound_stmt_p = genrtl_begin_compound_stmt (has_no_scope=1);
- */
}
/* Finish out the statement-expression begun by the previous call to
@@ -96,7 +92,10 @@ finish_init_stmts (stmt_expr, compound_stmt)
finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
if (building_stmt_tree ())
- stmt_expr = finish_stmt_expr (stmt_expr);
+ {
+ stmt_expr = finish_stmt_expr (stmt_expr);
+ STMT_EXPR_NO_SCOPE (stmt_expr) = true;
+ }
else
stmt_expr = finish_global_stmt_expr (stmt_expr);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index f53ac28..0f53f6b 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1186,7 +1186,7 @@ begin_global_stmt_expr ()
keep_next_level (1);
- return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
+ return last_tree ? last_tree : expand_start_stmt_expr(/*has_scope=*/1);
}
/* Finish the STMT_EXPR last begun with begin_global_stmt_expr. */