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: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org, ncm at cantrip dot org, drepper at redhat dot com
- Date: Wed, 30 Apr 2003 22:24:24 -0400
- Subject: Re: [3.3] Followup to C++ forced unwinding
- 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>
On 30 Apr 2003 17:29:20 -0700, Mark Mitchell <mark@codesourcery.com> wrote:
> If it is really true that we cannot enter "catch(...)" blocks for some
> reason (which I do not yet believe, despite Ulrich's usual inimitable
> expression of confidence), then running into a "catch(...)" block while
> unwinding should result in a call to std::terminate.
This makes sense to me.
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.
Jason