This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: PATCH to destroy C++ parameters in the caller
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Dec 2001 09:24:48 +0000
- Subject: Re: RFC: PATCH to destroy C++ parameters in the caller
- Organization: Codesourcery LLC
- References: <wvl7krpmhnz.fsf@prospero.cambridge.redhat.com>
Jason Merrill wrote:
>
> The C++ ABI says,
>
> The caller calls any non-trivial destructor for the parameter after
> returning (at the end of the containing expression).
>
> whereas in the past, g++ has destroyed parameters in the callee. For an
> example of why doing it in the caller is better, see the testcase attached
> below.
We should definitely fix this for 3.1, does it affect other languages?
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org