This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Representing EH in GENERIC
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: 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 19:01:17 -0500
- Subject: Re: Representing EH in GENERIC
- References: <wvlk7iybyo7.fsf@prospero.boston.redhat.com><20021127195546.GD31043@redhat.com>
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