diff options
author | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-02-20 18:22:32 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-02-20 18:22:32 +0000 |
commit | c9407e4c671efb42c76dbb80a13ecf0c5dc09f05 (patch) | |
tree | 40949ebadccd8eec61e63b81100bb256e38ed590 /gcc/stmt.c | |
parent | 0cbd39801459319899e08e930f5257c2ced61ddb (diff) | |
download | gcc-c9407e4c671efb42c76dbb80a13ecf0c5dc09f05.zip gcc-c9407e4c671efb42c76dbb80a13ecf0c5dc09f05.tar.gz gcc-c9407e4c671efb42c76dbb80a13ecf0c5dc09f05.tar.bz2 |
stmt.c (expand_return): If an attempt is made to return the error_mar_node...
* stmt.c (expand_return): If an attempt is made to return the
error_mar_node, treat the return like a return without a value.
From-SVN: r39924
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |