Exceptions

Jason Merrill jason@yorick.cygnus.com
Fri Sep 5 15:12:00 GMT 1997


>>>>> Mark Mitchell <mmitchell@usa.net> writes:

> I'm a bit confused about the current C++ exception-handling support in
> egcs.  Here's what I know:

> o There are setjmp()/longjmp() based exceptions, which are on by
>   default.  There are problems here bacause the flow graphs don't
>   look quite right; this leads to bogus warnings about clobbered
>   variables, or incorrect code.

> o There are non-sjlj exceptions, which should be faster, but which 
>   do not work on all targets, since they require that call stacks
>   are self-describing.

> I don't know whether the second variety works in general, and whether
> or not there are problems with the flow graphs there as well, and for
> what platforms they are supported.

No, probably, SPARC (and perhaps others).

> I also note that the info files have no information about any of this,
> so far as I can tell.  Even -fno-exceptions is not documented there.

The switches should be documented.  The implementation is documented in
except.c.

> If someone knows, I'd appreciate being told the answers to the
> questions I've given above, and as complete as possible a summary of
> the problems.  I'd also like to know if anyone is currently working on
> this stuff.  

I'm working on a replacement for the non-sjlj code that uses the DWARF 2
frame unwind information instead of inline unwinders.  Per is working on
adding type information to the exception range table so we only jump to
matching handlers.

> I'll offer in return to update the info documentation with what I
> learn, at the very least.  If no one else is looking at the problem,
> and I have time, I'll perhaps take a look at trying to fix some of the
> problems.

I don't think anyone's looking at the flow problem right now, unless Jim
is.  If not, that would be welcome.

Jason



More information about the Gcc mailing list