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: RFC: PATCH to destroy C++ parameters in the caller


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

> On Sat, Dec 15, 2001 at 12:49:20AM +0000, Jason Merrill wrote:
>> This patch, which I am not committing yet, implements the change by
>> changing how calls.c treats a TARGET_EXPR; rather than store it into a
>> new slot, nullifying its cleanup, we just take its address and pass that.

> Err, does this mean that you now pass structure parameters
> by reference when this was not done before?

No, they are still passed by invisible reference, just as before.  The only
difference is that previously the object we were passing by invisible
reference was allocated here, and now we will pass the slot allocated by
the TARGET_EXPR.  The only resulting change in semantics is that now we
will perform the cleanup for the TARGET_EXPR in the caller, whereas
previously we did it in the callee.

The change in destruction semantics is an ABI change, which is why I'm
interested in feedback.  It is a change to put us in compliance with the
ABI spec, however, and we already have other changes for 3.1.

Jason


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