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
This commit is contained in:
Jason Merrill 2002-08-22 19:22:53 -04:00 committed by Jason Merrill
parent 2263ca09cb
commit d65b1d77fd
10 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,12 @@
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>
* ggc-page.c: Avoid division in ggc_set_mark.

View File

@ -61,7 +61,7 @@ DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
/* Used to represent a 'return' statement. The operand is
RETURN_EXPR. */
RETURN_STMT_EXPR. */
DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
/* Used to represent a 'break' statement. */

View File

@ -945,7 +945,7 @@ extern tree strip_array_types PARAMS ((tree));
/* RETURN_STMT accessors. These give the expression associated with a
return statement, and whether it should be ignored when expanding
(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
expression statement. */

View File

@ -153,7 +153,7 @@ c_dump_tree (dump_info, t)
case RETURN_STMT:
dump_stmt (di, t);
dump_child ("expr", RETURN_EXPR (t));
dump_child ("expr", RETURN_STMT_EXPR (t));
dump_next_stmt (di, t);
break;

View File

@ -1384,7 +1384,7 @@ pp_c_statement (ppi, stmt)
case GOTO_STMT:
{
tree e = code == RETURN_STMT
? RETURN_EXPR (stmt)
? RETURN_STMT_EXPR (stmt)
: GOTO_DESTINATION (stmt);
pp_newline (ppi);

View File

@ -487,7 +487,7 @@ genrtl_return_stmt (stmt)
{
tree expr;
expr = RETURN_EXPR (stmt);
expr = RETURN_STMT_EXPR (stmt);
emit_line_note (input_filename, lineno);
if (!expr)

View File

@ -1,3 +1,8 @@
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>
Fix PR/7621

View File

@ -7382,7 +7382,7 @@ tsubst_expr (t, args, complain, in_decl)
case RETURN_STMT:
prep_stmt (t);
finish_return_stmt (tsubst_expr (RETURN_EXPR (t),
finish_return_stmt (tsubst_expr (RETURN_STMT_EXPR (t),
args, complain, in_decl));
break;

View File

@ -2506,7 +2506,7 @@ nullify_returns_r (tp, walk_subtrees, data)
if (TYPE_P (*tp))
*walk_subtrees = 0;
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
&& CLEANUP_DECL (*tp) == nrv)
CLEANUP_EH_ONLY (*tp) = 1;

View File

@ -442,10 +442,10 @@ copy_body_r (tp, walk_subtrees, data)
assignment into the equivalent of the original
RESULT_DECL. */
#ifndef INLINER_FOR_JAVA
if (RETURN_EXPR (return_stmt))
if (RETURN_STMT_EXPR (return_stmt))
{
*tp = build_stmt (EXPR_STMT,
RETURN_EXPR (return_stmt));
RETURN_STMT_EXPR (return_stmt));
STMT_IS_FULL_EXPR_P (*tp) = 1;
/* And then jump to the end of the function. */
TREE_CHAIN (*tp) = goto_stmt;