From fb9fa837090060b6fd541b91d36b8071fe458330 Mon Sep 17 00:00:00 2001 From: mmitchel Date: Tue, 20 Feb 2001 18:22:32 +0000 Subject: * stmt.c (expand_return): If an attempt is made to return the error_mar_node, treat the return like a return without a value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39924 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/stmt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/stmt.c') diff --git a/gcc/stmt.c b/gcc/stmt.c index 8465df7221c..80be1faf737 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -2946,7 +2946,12 @@ expand_return (retval) #endif if (retval == error_mark_node) - retval_rhs = NULL_TREE; + { + /* Treat this like a return of no value from a function that + returns a value. */ + expand_null_return (); + return; + } else if (TREE_CODE (retval) == RESULT_DECL) retval_rhs = retval; else if ((TREE_CODE (retval) == MODIFY_EXPR || TREE_CODE (retval) == INIT_EXPR) -- cgit v1.2.1