summaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 14:01:33 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 14:01:33 +0000
commit4cfd90300764d601a319883f5979fcea67d829a7 (patch)
treed9f451da73883db76d0425e08382fce4bb154737 /gcc/c-semantics.c
parentbba852750618143960eb4faff66df9dfa1c4b715 (diff)
downloadgcc-4cfd90300764d601a319883f5979fcea67d829a7.tar.gz
* c-common.h (RETURN_NULLIFIED_P): Lose.
* c-semantics.c (genrtl_return_stmt): Don't check it. Support named return value optimization for inlines, too. * decl.c (finish_function): Nullify returns here. * semantics.c (genrtl_start_function): Not here. (cp_expand_stmt): Don't mess with CLEANUP_STMTs. (nullify_returns_r): No longer static. Just clear RETURN_EXPR. Also nullify the CLEANUP_STMT for the nrv. * cp-tree.h: Declare it. * optimize.c (declare_return_variable): Replace the nrv with the return variable. * typeck.c (check_return_expr): Be more flexible on alignment check. Ignore cv-quals when checking for a matching type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 2ee2647e14e..e05ae76dc14 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -462,13 +462,7 @@ genrtl_return_stmt (stmt)
{
tree expr;
- /* If RETURN_NULLIFIED_P is set, the frontend has arranged to set up
- the return value separately, so just return the return value
- itself. This is used for the C++ named return value optimization. */
- if (RETURN_NULLIFIED_P (stmt))
- expr = DECL_RESULT (current_function_decl);
- else
- expr = RETURN_EXPR (stmt);
+ expr = RETURN_EXPR (stmt);
emit_line_note (input_filename, lineno);
if (!expr)