This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Representing EH in GENERIC


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]