This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ patch: fix ICE in trivial constructor
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Jul 2008 12:28:02 -0700
- Subject: Re: C++ patch: fix ICE in trivial constructor
- References: <486128C0.20303@redhat.com>
Andrew Haley wrote:
If targetm.cxx.cdtor_returns_this(), we ICE with a trivial test case:
extern "Java" {
class __JArray
{
public:
__JArray ()
{
}
};
}
This happens because a Java constructor doesn't have a return
value, regardless of targetm.cxx.cdtor_returns_this(). The fix is
trivial/obvious.
I see that this already went in, but what about fixing this on the Java
side? For CNI purposes, it seems desirable to make the ABIs truly
interoperable.
In any case, I think a comment in decl.c:finish_constructor_body would
be good; it's not going to be obvious to C++ folks why we don't do this
for Java.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713