diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-04-30 18:03:36 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-04-30 18:03:36 +0000 |
commit | baf05df0592f492bcc0e9359843576f724ff830f (patch) | |
tree | 32349ad4d0deaa6784a99d44bf8609ccecff05a9 /gcc | |
parent | 04dfcc8fbe278ed19ad1aea74edb7c651417cbe3 (diff) | |
download | gcc-baf05df0592f492bcc0e9359843576f724ff830f.zip gcc-baf05df0592f492bcc0e9359843576f724ff830f.tar.gz gcc-baf05df0592f492bcc0e9359843576f724ff830f.tar.bz2 |
* method.c (emit_thunk): Don't try to return a `void' value.
From-SVN: r33554
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/method.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c75429..fbfd16b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2000-04-30 Mark Mitchell <mark@codesourcery.com> + * method.c (emit_thunk): Don't try to return a `void' value. + * optimize.c (initialize_inlined_parameters): If the parameter is addressable, we need to make a new VAR_DECL, even if the initializer is constant. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 31b02be..ff1237e 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -2187,7 +2187,10 @@ emit_thunk (thunk_fndecl) t = tree_cons (NULL_TREE, a, t); t = nreverse (t); t = build_call (function, t); - finish_return_stmt (t); + if (!same_type_p (TREE_TYPE (t), void_type_node)) + finish_return_stmt (t); + else + finish_expr_stmt (t); /* The back-end expects DECL_INITIAL to contain a BLOCK, so we clear this here. */ |