From 7dd3724184cd6a9e911c4112d0942729405d0a5d Mon Sep 17 00:00:00 2001 From: kenner Date: Sat, 26 Jun 2004 21:11:23 +0000 Subject: 2004-06-26 Richard Kenner * c-common.c (c_safe_from_p, c_walk_subtrees): Deleted. * c-common.def (DECL_STMT): Remove. * c-common.h (DECL_STMT_DECL): Deleted. (COMPOUNT_LITERAL_EXPR_DECL): Use DECL_EXPR_DECL. (c_safe_from_p, c_walk_subtrees): Deleted. * c-decl.c, c-parse.in, c-pretty-print.c: DECL_STMT now DECL_EXPR. * c-dump.c (c_dump_tree, case DECL_STMT): Deleted. * c-gimplify.c (gimplify_decl_stmt): Deleted. (gimplify_compound_literal_expr): Use DECL_EXPR_DECL and gimplify_and_add. (c_gimplify_expr, case DECL_EXPR): New case. (c_gimplify_expr, case DECL_STMT): Deleted. * c-lang.c (LANG_HOOKS_SAFE_FROM_P): Likewise. (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise. * expr.c (safe_from_p, case 's'): New case. * gimplify.c (gimplify_decl_expr): New function. (gimplify_expr, case DECL_EXPR): New case. * tree-inline.c (walk_tree): Walk into all fields of a type and decl only if they are in a DECL_EXPR. (mark_local_for_remap_r): Minor code cleanup. * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Add else. * tree.c (has_cleanups, case DECL_EXPR): New case. * tree.def (DECL_EXPR): New code. * tree.h (DECL_EXPR_DECL): New macro. * objc/objc-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83721 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/semantics.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc/cp/semantics.c') diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c9f66d9dc1c..b4894607201 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -316,9 +316,9 @@ maybe_cleanup_point_expr (tree expr) /* Create a declaration statement for the declaration given by the DECL. */ void -add_decl_stmt (tree decl) +add_decl_expr (tree decl) { - tree r = build_stmt (DECL_STMT, decl); + tree r = build_stmt (DECL_EXPR, decl); if (DECL_INITIAL (decl)) r = maybe_cleanup_point_expr (r); add_stmt (r); @@ -382,7 +382,7 @@ push_cleanup (tree decl, tree cleanup, bool eh_only) /* Begin a conditional that might contain a declaration. When generating normal code, we want the declaration to appear before the statement containing the conditional. When generating template code, we want the - conditional to be rendered as the raw DECL_STMT. */ + conditional to be rendered as the raw DECL_EXPR. */ static void begin_cond (tree *cond_p) @@ -399,7 +399,7 @@ finish_cond (tree *cond_p, tree expr) if (processing_template_decl) { tree cond = pop_stmt_list (*cond_p); - if (TREE_CODE (cond) == DECL_STMT) + if (TREE_CODE (cond) == DECL_EXPR) expr = cond; } *cond_p = expr; @@ -1141,7 +1141,7 @@ void finish_label_decl (tree name) { tree decl = declare_local_label (name); - add_decl_stmt (decl); + add_decl_expr (decl); } /* When DECL goes out of scope, make sure that CLEANUP is executed. */ @@ -2950,10 +2950,10 @@ finalize_nrv_r (tree* tp, int* walk_subtrees, void* data) else if (TREE_CODE (*tp) == CLEANUP_STMT && CLEANUP_DECL (*tp) == dp->var) CLEANUP_EH_ONLY (*tp) = 1; - /* Replace the DECL_STMT for the NRV with an initialization of the + /* Replace the DECL_EXPR for the NRV with an initialization of the RESULT_DECL, if needed. */ - else if (TREE_CODE (*tp) == DECL_STMT - && DECL_STMT_DECL (*tp) == dp->var) + else if (TREE_CODE (*tp) == DECL_EXPR + && DECL_EXPR_DECL (*tp) == dp->var) { tree init; if (DECL_INITIAL (dp->var) -- cgit v1.2.3