another exception handling question.... (was Re: trying to glue Modula-3 onto egcs table based exception handl ing support)
Marc Fiuczynski
mef@cs.washington.edu
Thu Jun 1 15:32:00 GMT 2000
I got regular try-except blocks to work from my Modula-3 front-end with
the table-based exception handling support in gcc 2.95.2.
What I need to do now is provide support for try-finally statements. A
try-finally block looks like this:
TRY
guarded statements
FINALLY
final statements
END
And the "final statements" will always be executed, regardless if an
exception was raised or not in the "guarded statements" above.
I am trying to figure out what to use from except.c. It seems that
add_partial_protect() and end_protect_partials() are kinda what I want,
which are used for "cleanups". However, it seems that these cleanups
are also only executed in an exceptional situation, which is not exactly
what I want. Further, I'd like the code that gets generated for the
"final statements" to be immediately follow the guarded statements. I
don't really see the right stuff in except.c to handle this.
Any comments/hints/feedback appreciated.
Cheers,
Marc
More information about the Gcc
mailing list