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: Thu, 28 Nov 2002 22:51:03 -0500
- Subject: Re: Representing EH in GENERIC
- References: <wvlk7iybyo7.fsf@prospero.boston.redhat.com><20021127195546.GD31043@redhat.com><wvl3cpmbm0i.fsf@prospero.boston.redhat.com><20021128003356.GB31319@redhat.com>
On Wed, 27 Nov 2002 16:33:56 -0800, Richard Henderson <rth@redhat.com> wrote:
> On Wed, Nov 27, 2002 at 07:01:17PM -0500, Jason Merrill wrote:
>> 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.
>
> I guess that seems reasonable.
A related question is whether to group multiple catch clauses together or
break them up, i.e. turn
try { ... }
catch (int) { ... }
catch (...) { ... }
into
try
{
try { ... }
catch (int) { ... }
}
catch (...) { ... }
The grouping does seem like a syntactic convenience more than anything
else, but I'm not sure that breaking them up buys us anything either.
Jason