This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ patch: fix ICE in trivial constructor


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]