aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-20 03:10:02 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-20 03:10:02 -0700
commit543a0daa84fd7dda27536a892dd88896ba25b1f3 (patch)
tree3b1f57793fdac8988d25b629b21ba09e5cade391 /gcc/c-decl.c
parentaa33d725018cde8ab90b73e355114343be9072ce (diff)
downloadgcc-543a0daa84fd7dda27536a892dd88896ba25b1f3.zip
gcc-543a0daa84fd7dda27536a892dd88896ba25b1f3.tar.gz
gcc-543a0daa84fd7dda27536a892dd88896ba25b1f3.tar.bz2
c-common.h (add_decl_stmt): Move to cp-tree.h.
* c-common.h (add_decl_stmt): Move to cp-tree.h. * c-decl.c (finish_decl): Don't use add_decl_stmt. * c-parse.in: Likewise. * c-gimplify.c (gimplify_expr_stmt): Don't build CLEANUP_POINT_EXPR. (gimplify_c_loop, gimplify_return_stmt, gimplify_decl_stmt): Likewise. * c-semantics.c (add_decl_stmt): Move to cp/semantics.c. cp/ * cp-tree.h (add_decl_stmt): Declare. * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR. * semantics.c (maybe_cleanup_point_expr): New. (add_decl_stmt, finish_expr_stmt, finish_return_stmt, finish_for_expr, finish_switch_cond): Use it. (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN. From-SVN: r83409
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index cbf5795..aa23a9f 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2940,7 +2940,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
}
if (TREE_CODE (decl) != FUNCTION_DECL)
- add_decl_stmt (decl);
+ add_stmt (build_stmt (DECL_STMT, decl));
}
if (!DECL_FILE_SCOPE_P (decl))
@@ -2967,7 +2967,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
{
if (!DECL_FILE_SCOPE_P (decl)
&& variably_modified_type_p (TREE_TYPE (decl)))
- add_decl_stmt (decl);
+ add_stmt (build_stmt (DECL_STMT, decl));
rest_of_decl_compilation (decl, NULL, DECL_FILE_SCOPE_P (decl), 0);
}