summaryrefslogtreecommitdiff
path: root/gcc/c-pretty-print.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-16 18:21:20 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-16 18:21:20 +0000
commitdaf6dff5ac4c34fd82b7f72f6f40de906e8cdb24 (patch)
treee52131b3bd23ac10dfbc97741cf058791e88679f /gcc/c-pretty-print.c
parentf3fbd62def4f74f293a6e3a76a04e25cab10de4c (diff)
downloadgcc-daf6dff5ac4c34fd82b7f72f6f40de906e8cdb24.tar.gz
* c-common.def (GOTO_STMT, LABEL_STMT): Remove.
* c-common.c (c_add_case_label): Use LABEL_EXPR. * c-common.h (GOTO_FAKE_P, LABEL_STMT_LABEL): Remove. (c_common_stmt_codes): Remove GOTO_STMT, LABEL_STMT. * c-dump.c (c_dump_tree): Likewise. * c-gimplify.c (c_gimplify_stmt): Likewise. * c-pretty-print.c (pp_c_statement): Likewise. * c-parse.in (stmt): Use GOTO_EXPR. (label): Use LABEL_EXPR. * c-semantics.c (build_stmt): Set TREE_TYPE to void. * tree-inline.c (copy_body_r): Don't build empty BLOCKs. cp/ * decl.c (finish_destructor_body): Use LABEL_EXPR. * parser.c (cp_parser_statement): Update commentary. * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR. * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise. * tree.c (mark_local_for_remap_r): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pretty-print.c')
-rw-r--r--gcc/c-pretty-print.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c
index 06b8654ab24..c1d9d60ee72 100644
--- a/gcc/c-pretty-print.c
+++ b/gcc/c-pretty-print.c
@@ -1913,28 +1913,22 @@ pp_c_statement (c_pretty_printer *pp, tree stmt)
identifier : statement
case constant-expression : statement
default : statement */
- case LABEL_STMT:
case CASE_LABEL:
if (pp_needs_newline (pp))
pp_newline_and_indent (pp, -3);
else
pp_indentation (pp) -= 3;
- if (code == LABEL_STMT)
- pp_c_tree_decl_identifier (pp, LABEL_STMT_LABEL (stmt));
- else if (code == CASE_LABEL)
+ if (CASE_LOW (stmt) == NULL_TREE)
+ pp_identifier (pp, "default");
+ else
{
- if (CASE_LOW (stmt) == NULL_TREE)
- pp_identifier (pp, "default");
- else
+ pp_c_identifier (pp, "case");
+ pp_c_whitespace (pp);
+ pp_conditional_expression (pp, CASE_LOW (stmt));
+ if (CASE_HIGH (stmt))
{
- pp_c_identifier (pp, "case");
- pp_c_whitespace (pp);
- pp_conditional_expression (pp, CASE_LOW (stmt));
- if (CASE_HIGH (stmt))
- {
- pp_identifier (pp, "...");
- pp_conditional_expression (pp, CASE_HIGH (stmt));
- }
+ pp_identifier (pp, "...");
+ pp_conditional_expression (pp, CASE_HIGH (stmt));
}
}
pp_colon (pp);
@@ -2098,14 +2092,11 @@ pp_c_statement (c_pretty_printer *pp, tree stmt)
break;
case RETURN_STMT:
- case GOTO_STMT:
{
- tree e = code == RETURN_STMT
- ? RETURN_STMT_EXPR (stmt)
- : GOTO_DESTINATION (stmt);
+ tree e = RETURN_STMT_EXPR (stmt);
if (pp_needs_newline (pp))
pp_newline_and_indent (pp, 0);
- pp_c_identifier (pp, code == RETURN_STMT ? "return" : "goto");
+ pp_c_identifier (pp, "return");
pp_c_whitespace (pp);
if (e)
{