summaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-17 01:24:06 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-17 01:24:06 +0000
commit632f8185b6559a4b481bcc62232041b183b3a28b (patch)
treeadae3bbd37c6518542d8e5d8f6e0b08583a9f162 /gcc/cp/cxx-pretty-print.c
parentb576c0c19ef82ab9855bea181227c7d27146deb3 (diff)
downloadgcc-632f8185b6559a4b481bcc62232041b183b3a28b.tar.gz
* c-common.def (COMPOUND_STMT): Remove.
* c-common.c (finish_fname_decls): Don't look through it. * c-typeck.c (c_tree_expr_nonnegative_p): Likewise. * c-common.h (COMPOUND_BODY): Remove. (c_common_stmt_codes): Remove COMPOUND_STMT. * c-dump.c (c_dump_tree): Likewise. * c-gimplify.c (c_gimplify_stmt): Likewise. * c-pretty-print.c (pp_c_statement): Likewise. * tree.h (DECL_SAVED_TREE): Update commentary. * doc/c-tree.texi (ASM_EXPR): Rename from ASM_STMT. (CASE_LABEL_EXPR): Rename from CASE_LABEL. (GOTO_EXPR): Rename from GOTO_STMT. (GOTO_FAKE_P): Remove. (COMPOUND_STMT): Remove. (HANDLER): Update wrt COMPOUND_STMT. (STMT_EXPR): Likewise. (LABEL_EXPR): Rename from LABEL_STMT. (SCOPE_STMT): Remove. * objc/objc-act.c (objc_build_try_catch_finally_stmt): Don't look through COMPOUND_STMT. cp/ * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill. (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New. * cxx-pretty-print.c (pp_cxx_function_definition): Move handling of CTOR_INITIALIZER ... (pp_cxx_statement): ... here. * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK. (finish_function): Use alloc_stmt_list to zap entire function. * parser.c (cp_parser_compound_statement): Update commentary. * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT. * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise. (finish_stmt_expr): Don't look through COMPOUND_STMT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83281 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index c5e667d9495..a50ecc4114c 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -1304,17 +1304,7 @@ pp_cxx_function_definition (cxx_pretty_printer *pp, tree t)
pp_needs_newline (pp) = true;
pp->enclosing_scope = DECL_CONTEXT (t);
if (DECL_SAVED_TREE (t))
- {
- tree body = DECL_SAVED_TREE (t);
- if (TREE_CODE (body) == COMPOUND_STMT
- && TREE_CODE (COMPOUND_BODY (body)) == CTOR_INITIALIZER)
- {
- body = COMPOUND_BODY (body);
- pp_cxx_ctor_initializer (pp, body);
- body = TREE_CHAIN (body);
- }
- pp_cxx_statement (pp, body);
- }
+ pp_cxx_statement (pp, DECL_SAVED_TREE (t));
else
{
pp_cxx_semicolon (pp);
@@ -1471,6 +1461,10 @@ pp_cxx_statement (cxx_pretty_printer *pp, tree t)
{
switch (TREE_CODE (t))
{
+ case CTOR_INITIALIZER:
+ pp_cxx_ctor_initializer (pp, t);
+ break;
+
case USING_STMT:
pp_cxx_identifier (pp, "using");
pp_cxx_identifier (pp, "namespace");