implementing exception handlers in a front end

Gaius Mulley
Mon Sep 8 22:16:00 GMT 2008

"Richard Guenther" <> writes:

> > to its language tree.def and gimplify this.  Before I embark on
> > this I'd like to ask whether using
> > __builtin_longjmp/__builtin_setjmp is definitely the wrong way to
> > go?
> Definitely.  You will be not able to handle/throw exceptions from
> other languages if the target ABI doesn't use sjlj exceptions (which
> only a few use).

just to say thanks for the advice and that they have been implemented
in the Modula-2 front end using the cpp TRY_CATCH_EXPR/THROW etc tree
nodes.  A few core ISO Modula-2 runtime exception libraries have also
been implemented.

Anyway here are some screen-casts of inter-language C++/M2 and M2/Python
throwing and catching exceptions:

[screen-casts are roughly 7MB each]


More information about the Gcc mailing list