This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Representing EH in GENERIC
- From: Andrew Haley <aph at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>,Diego Novillo <dnovillo at redhat dot com>,"Jeffrey A. Law" <law at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 27 Nov 2002 20:04:41 +0000 (GMT)
- Subject: Representing EH in GENERIC
- References: <wvlk7iybyo7.fsf@prospero.boston.redhat.com>
Jason Merrill writes:
> In order to simplify C++, we need to decide how to represent the various EH
> constructs in GENERIC/GIMPLE. Currently, the only EH concept represented
> in GENERIC is TRY_CATCH_EXPR, which corresponds to ERT_CLEANUP in the
> backend EH code. We have no representation for catch handlers (ERT_CATCH),
> exception specifications (ERT_ALLOWED_EXCEPTIONS), or ERT_MUST_NOT_THROW.
>
> The question is, which of these do we want to be able to represent directly
> in GENERIC/GIMPLE? If we simplify, the backend needs to re-derive which of
> the above region types we actually want to encode.
A related question : how would you represent try...catch...finally ?
public static void main(String[] args) {
try {
blowUp();
} catch (BlewIt b) {
System.out.println("BlewIt");
} finally {
System.out.println("Always output");
}
}
Andrew.