summaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-21 23:30:30 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-21 23:30:30 +0000
commitc857cd60b89c8c9cb6f064ab3d1de1eaae22db1d (patch)
tree549a437788493737d07ebf98e175601b039ef1a9 /gcc/cp/semantics.c
parente030e0eaa5fafeb4f9e6a1854f7d4dc726cce70e (diff)
downloadgcc-c857cd60b89c8c9cb6f064ab3d1de1eaae22db1d.tar.gz
* c-common.def (RETURN_STMT): Remove.
* c-common.h (RETURN_STMT_EXPR): Remove. (c_expand_return, build_return_stmt): Remove. (c_common_stmt_codes): Remove RETURN_STMT. * c-dump.c (dump_next_stmt): Remove. (c_dump_tree): Remove RETURN_STMT. * c-decl.c (finish_function): Use c_finish_return. * c-parse.in (stmt): Likewise. * c-gimplify.c (gimplify_return_stmt): Remove. (c_gimplify_expr): Remove RETURN_STMT. * c-pretty-print.c (pp_c_statement): Likewise. * c-semantics.c (build_return_stmt): Remove. * c-tree.h (c_finish_return): Declare. * c-typeck.c (c_finish_return): Rename from c_expand_return. Return void. Build RETURN_EXPR directly. * tree-dump.h (dump_next_stmt): Remove. cp/ * dump.c (cp_dump_tree): Don't use dump_next_stmt. * parser.c (cp_parser_jump_statement): Update commentary. * pt.c (tsubst_expr): Use RETURN_EXPR. * semantics.c (finish_return_stmt): Likewise. (finalize_nrv_r): Likewise. * typeck.c, typeck2.c: Update file start commentary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83461 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 826ac688a76..0da94942c2e 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3,8 +3,8 @@
building RTL. These routines are used both during actual parsing
and during the instantiation of template functions.
- Copyright (C) 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Written by Mark Mitchell (mmitchell@usa.net) based on code found
formerly in parse.y and pt.c.
@@ -667,7 +667,7 @@ finish_return_stmt (tree expr)
}
}
- r = build_stmt (RETURN_STMT, expr);
+ r = build_stmt (RETURN_EXPR, expr);
r = maybe_cleanup_point_expr (r);
r = add_stmt (r);
finish_stmt ();
@@ -3009,8 +3009,8 @@ finalize_nrv_r (tree* tp, int* walk_subtrees, void* data)
/* Change all returns to just refer to the RESULT_DECL; this is a nop,
but differs from using NULL_TREE in that it indicates that we care
about the value of the RESULT_DECL. */
- else if (TREE_CODE (*tp) == RETURN_STMT)
- RETURN_STMT_EXPR (*tp) = dp->result;
+ else if (TREE_CODE (*tp) == RETURN_EXPR)
+ TREE_OPERAND (*tp, 0) = dp->result;
/* Change all cleanups for the NRV to only run when an exception is
thrown. */
else if (TREE_CODE (*tp) == CLEANUP_STMT
@@ -3052,7 +3052,7 @@ finalize_nrv_r (tree* tp, int* walk_subtrees, void* data)
}
/* Called from finish_function to implement the named return value
- optimization by overriding all the RETURN_STMTs and pertinent
+ optimization by overriding all the RETURN_EXPRs and pertinent
CLEANUP_STMTs and replacing all occurrences of VAR with RESULT, the
RESULT_DECL for the function. */