EH in C (was: Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)
Richard Henderson
rth@cygnus.com
Tue Feb 1 01:25:00 GMT 2000
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~
More information about the Gcc
mailing list