This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
another exception handling question.... (was Re: trying to glue Modula-3 onto egcs table based exception handl ing support)
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: another exception handling question.... (was Re: trying to glue Modula-3 onto egcs table based exception handl ing support)
- From: Marc Fiuczynski <mef at cs dot washington dot edu>
- Date: Thu, 1 Jun 2000 15:32:36 -0700
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