This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EH in C (was: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: EH in C (was: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 1 Feb 2000 01:25:40 -0800
- Cc: llewelly at 198 dot dsl dot xmission dot com, Bill Tutt <rassilon at list dot org>, gcc at gcc dot gnu dot org
- References: <Pine.LNX.3.95.1000131231310.24607A-100000@lima.mudlib.org> <Pine.LNX.4.10.10002010018280.9063-100000@198.dsl.xmission.com> <20000201001942.A936@cygnus.com> <20000201002636.B12406@wolery.cumb.org>
On Tue, Feb 01, 2000 at 12:26:36AM -0800, Zack Weinberg wrote:
> The other thing to consider here is we probably don't want to drag all
> of RTTI into C.
I don't think that's really a problem. Modulo the cancel-exception
thing, we could model MS EH like
__try { foo(); }
__except (some-test) { bar(); }
__except (some-other-test) { baz(); }
to
try { foo(); }
catch (...) {
if (some-test) bar();
else if (some-other-test) baz();
else throw;
}
Not quite as efficient as triggering off a type, but who ever
worried about run-time efficiency of exceptions, anyway.
r~