Commit d65b1d77 by Jason Merrill Committed by Jason Merrill

c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.

        * c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
        * c-common.def: Adjust.
        * c-dump.c (c_dump_tree): Adjust.
        * c-semantics.c (genrtl_return_stmt): Adjust.
        * c-pretty-print.c (pp_c_statement): Adjust.
        * tree-inline.c (copy_body_r): Adjust.

2002-08-22  Jason Merrill  <jason@redhat.com>

        * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
        * semantics.c (nullify_returns_r): Likewise.

From-SVN: r56523
parent 2263ca09
2002-08-22 Jason Merrill <jason@redhat.com>
* c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
* c-common.def: Adjust.
* c-dump.c (c_dump_tree): Adjust.
* c-semantics.c (genrtl_return_stmt): Adjust.
* c-pretty-print.c (pp_c_statement): Adjust.
* tree-inline.c (copy_body_r): Adjust.
2002-08-22 Zack Weinberg <zack@codesourcery.com> 2002-08-22 Zack Weinberg <zack@codesourcery.com>
* ggc-page.c: Avoid division in ggc_set_mark. * ggc-page.c: Avoid division in ggc_set_mark.
......
...@@ -61,7 +61,7 @@ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2) ...@@ -61,7 +61,7 @@ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
DEFTREECODE (DO_STMT, "do_stmt", 'e', 2) DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
/* Used to represent a 'return' statement. The operand is /* Used to represent a 'return' statement. The operand is
RETURN_EXPR. */ RETURN_STMT_EXPR. */
DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1) DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
/* Used to represent a 'break' statement. */ /* Used to represent a 'break' statement. */
......
...@@ -945,7 +945,7 @@ extern tree strip_array_types PARAMS ((tree)); ...@@ -945,7 +945,7 @@ extern tree strip_array_types PARAMS ((tree));
/* RETURN_STMT accessors. These give the expression associated with a /* RETURN_STMT accessors. These give the expression associated with a
return statement, and whether it should be ignored when expanding return statement, and whether it should be ignored when expanding
(as opposed to inlining). */ (as opposed to inlining). */
#define RETURN_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0) #define RETURN_STMT_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0)
/* EXPR_STMT accessor. This gives the expression associated with an /* EXPR_STMT accessor. This gives the expression associated with an
expression statement. */ expression statement. */
......
...@@ -153,7 +153,7 @@ c_dump_tree (dump_info, t) ...@@ -153,7 +153,7 @@ c_dump_tree (dump_info, t)
case RETURN_STMT: case RETURN_STMT:
dump_stmt (di, t); dump_stmt (di, t);
dump_child ("expr", RETURN_EXPR (t)); dump_child ("expr", RETURN_STMT_EXPR (t));
dump_next_stmt (di, t); dump_next_stmt (di, t);
break; break;
......
...@@ -1384,7 +1384,7 @@ pp_c_statement (ppi, stmt) ...@@ -1384,7 +1384,7 @@ pp_c_statement (ppi, stmt)
case GOTO_STMT: case GOTO_STMT:
{ {
tree e = code == RETURN_STMT tree e = code == RETURN_STMT
? RETURN_EXPR (stmt) ? RETURN_STMT_EXPR (stmt)
: GOTO_DESTINATION (stmt); : GOTO_DESTINATION (stmt);
pp_newline (ppi); pp_newline (ppi);
......
...@@ -487,7 +487,7 @@ genrtl_return_stmt (stmt) ...@@ -487,7 +487,7 @@ genrtl_return_stmt (stmt)
{ {
tree expr; tree expr;
expr = RETURN_EXPR (stmt); expr = RETURN_STMT_EXPR (stmt);
emit_line_note (input_filename, lineno); emit_line_note (input_filename, lineno);
if (!expr) if (!expr)
......
2002-08-22 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
* semantics.c (nullify_returns_r): Likewise.
2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net> 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
Fix PR/7621 Fix PR/7621
......
...@@ -7382,7 +7382,7 @@ tsubst_expr (t, args, complain, in_decl) ...@@ -7382,7 +7382,7 @@ tsubst_expr (t, args, complain, in_decl)
case RETURN_STMT: case RETURN_STMT:
prep_stmt (t); prep_stmt (t);
finish_return_stmt (tsubst_expr (RETURN_EXPR (t), finish_return_stmt (tsubst_expr (RETURN_STMT_EXPR (t),
args, complain, in_decl)); args, complain, in_decl));
break; break;
......
...@@ -2506,7 +2506,7 @@ nullify_returns_r (tp, walk_subtrees, data) ...@@ -2506,7 +2506,7 @@ nullify_returns_r (tp, walk_subtrees, data)
if (TYPE_P (*tp)) if (TYPE_P (*tp))
*walk_subtrees = 0; *walk_subtrees = 0;
else if (TREE_CODE (*tp) == RETURN_STMT) else if (TREE_CODE (*tp) == RETURN_STMT)
RETURN_EXPR (*tp) = NULL_TREE; RETURN_STMT_EXPR (*tp) = NULL_TREE;
else if (TREE_CODE (*tp) == CLEANUP_STMT else if (TREE_CODE (*tp) == CLEANUP_STMT
&& CLEANUP_DECL (*tp) == nrv) && CLEANUP_DECL (*tp) == nrv)
CLEANUP_EH_ONLY (*tp) = 1; CLEANUP_EH_ONLY (*tp) = 1;
......
...@@ -442,10 +442,10 @@ copy_body_r (tp, walk_subtrees, data) ...@@ -442,10 +442,10 @@ copy_body_r (tp, walk_subtrees, data)
assignment into the equivalent of the original assignment into the equivalent of the original
RESULT_DECL. */ RESULT_DECL. */
#ifndef INLINER_FOR_JAVA #ifndef INLINER_FOR_JAVA
if (RETURN_EXPR (return_stmt)) if (RETURN_STMT_EXPR (return_stmt))
{ {
*tp = build_stmt (EXPR_STMT, *tp = build_stmt (EXPR_STMT,
RETURN_EXPR (return_stmt)); RETURN_STMT_EXPR (return_stmt));
STMT_IS_FULL_EXPR_P (*tp) = 1; STMT_IS_FULL_EXPR_P (*tp) = 1;
/* And then jump to the end of the function. */ /* And then jump to the end of the function. */
TREE_CHAIN (*tp) = goto_stmt; TREE_CHAIN (*tp) = goto_stmt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment