Representing EH in GENERIC
Andrew Haley
aph@redhat.com
Thu Nov 28 05:48:00 GMT 2002
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.
More information about the Gcc
mailing list