This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3] Followup to C++ forced unwinding
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, ncm at cantrip dot org
- Date: Wed, 30 Apr 2003 19:50:39 -0700
- Subject: Re: [3.3] Followup to C++ forced unwinding
- Organization: Red Hat, Inc.
- References: <20030430175335.GA18958@twiddle.net> <1051727981.3301.100.camel@minax.codesourcery.com> <20030430210342.GB697@redhat.com> <1051743305.3301.248.camel@minax.codesourcery.com> <wvl4r4finq6.fsf@prospero.boston.redhat.com> <1051748960.3301.295.camel@minax.codesourcery.com> <wvlznm7h09z.fsf@prospero.boston.redhat.com> <20030501024059.GA697@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard Henderson wrote:
> On Wed, Apr 30, 2003 at 10:24:24PM -0400, Jason Merrill wrote:
>
>>Actually, I have an idea for how to DTRT here: give terminate() as the
>>destructor for the exception object in the forced unwind case. So if the
>>catch(...) block rethrows, all is good, but if we exit the catch block some
>>other way, we try to clean up the exception, which calls terminate.
>
>
> Oh, cool. This is a *much* nicer idea than I was contemplating.
> Yes, I can agree to this. Uli, does this satisfy?
This means the object which is passed to the catch() code has a
destructor which is if necessary executed and can be prevented to be
called by explicitly rethrowing? This sounds excellent.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+sIt/2ijCOnn/RHQRAuchAJ4mw9yGRnXqBc2lcjS+r+6gdpJacACgmW43
qr/1DiLO0HRSnC7sMM8G9NE=
=klB3
-----END PGP SIGNATURE-----