Representing EH in GENERIC

Jason Merrill jason@redhat.com
Thu Nov 28 20:33:00 GMT 2002


On Wed, 27 Nov 2002 11:55:46 -0800, Richard Henderson <rth@redhat.com> wrote:

> On Wed, Nov 27, 2002 at 02:27:52PM -0500, Jason Merrill wrote:
>> It probably makes sense to always represent an EH region with a
>> TRY_CATCH_EXPR, and distinguish between the different varieties based on
>> the handler operand.
>
> I dunno.  I don't want to make it difficult to recreate the
> proper form of the EH region after the fact.  Something that
> seems particularly awkward with ALLOWED_EXCEPTIONS.
>
> If we had some *very* special handler operand for ALLOWED and
> MUST_NOT_THROW, then fine.  Otherwise I'd rather we added 
> extra tree codes.

I actually meant that regardless of whether or not they have separate tree
codes.  If there are distinct tree codes, they would still go in the
handler operand of the TRY_CATCH_EXPR, the idea being that the notion of an
EH region can be separated from what you do if you see an exception.

So, in addition to CATCH_EXPR, there would be something like an
ALLOWED_EXCEPTIONS_EXPR which would take a vector of types and an
expression to evaluate on failure.  MUST_NOT_THROW could just be a
degenerate case.

Jason



More information about the Gcc mailing list