diff options
author | Andrew Haley <aph@redhat.com> | 2008-07-01 12:56:08 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2008-07-01 12:56:08 +0000 |
commit | 298b7d2bc5602026656853b7ad6a8bdaa87a29a1 (patch) | |
tree | 0ecaa5a3372af24f0038ce6fc99dd49c826cdb90 | |
parent | c0d459f0e6282d3f1777dec137eb6c90f23320d0 (diff) | |
download | gcc-298b7d2bc5602026656853b7ad6a8bdaa87a29a1.zip gcc-298b7d2bc5602026656853b7ad6a8bdaa87a29a1.tar.gz gcc-298b7d2bc5602026656853b7ad6a8bdaa87a29a1.tar.bz2 |
decl.c (finish_constructor_body): Don't set the return value of the constructor if...
2008-07-01 Andrew Haley <aph@redhat.com>
* decl.c (finish_constructor_body): Don't set the return value of
the constructor if the constructor is that of a Java type.
From-SVN: r137317
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dd40a29..c9b04e3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-01 Andrew Haley <aph@redhat.com> + + * decl.c (finish_constructor_body): Don't set the return value of + the constructor if the constructor is that of a Java type. + 2008-06-30 Jakub Jelinek <jakub@redhat.com> PR c++/36662 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 32be05c..c6ae93e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11606,7 +11606,8 @@ finish_constructor_body (void) tree val; tree exprstmt; - if (targetm.cxx.cdtor_returns_this ()) + if (targetm.cxx.cdtor_returns_this () + && (! TYPE_FOR_JAVA (current_class_type))) { /* Any return from a constructor will end up here. */ add_stmt (build_stmt (LABEL_EXPR, cdtor_label)); |