This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] Make constructors return this
- From: Andrew Haley <aph at redhat dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>, Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 4 Aug 2004 16:44:03 +0100
- Subject: Re: [arm] Make constructors return this
- References: <200407012328.25836.paul@codesourcery.com><40E5CD1B.3050203@codesourcery.com><200408041633.18661.paul@codesourcery.com>
Paul Brook writes:
> On Friday 02 July 2004 22:01, Mark Mitchell wrote:
> > Paul Brook wrote:
> > >The patch below makes full and subobject constructors and destructors
> > > return the object constructed or destroyed, as required by the ARM EABI.
> > > It doesn't yet attempt to use this information.
> <snip>
> > >+ /* We can't use the proper return type here because we run into
> > >+ problems with abiguous bases and covariant returns. */
> > >+ if (targetm.cxx.cdtor_returns_this () && !TYPE_FOR_JAVA (optype))
> >
> > Why not do this in the TYPE_FOR_JAVA case as well?
>
> Two reasons:
> - (void *) isn't a valid java type.
> - It would change the Java ABI, requiring corresponding changes to gcj and
> other JVMs.
Why would it? If the library doesn't use the return value, which
would anything need to change?
Andrew.