diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-20 18:22:32 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-20 18:22:32 +0000 |
| commit | fb9fa837090060b6fd541b91d36b8071fe458330 (patch) | |
| tree | 40949ebadccd8eec61e63b81100bb256e38ed590 /gcc/stmt.c | |
| parent | e999f3b1286079daf5190bdca56084f915cdab5c (diff) | |
| download | ppe42-gcc-fb9fa837090060b6fd541b91d36b8071fe458330.tar.gz ppe42-gcc-fb9fa837090060b6fd541b91d36b8071fe458330.zip | |
* 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
Diffstat (limited to 'gcc/stmt.c')
| -rw-r--r-- | gcc/stmt.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) |

