This is the mail archive of the 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]

Re: C++: Tag transparent binding contour

On Fri, 19 Sep 2003 01:47:24 -0700, "Mark Mitchell" <> wrote:

>> Thanks. Do you have a suggestion for dealing with the (pseudo-)scope
> created
>> for EH purposes?  If I understand Jason correctly, we need a region to
>> contain only EH stuff and no names.  sk_cleanup (following Jason's
>> previous adice) seems to work -- but I agree with you that it would be
>> nicer if we didn't need it.
> We've lived with this wart for a long time; we can live with it a while
> longer.  So, I don't object to sk_cleanup; it's no worse than what we have
> now.
> I'm not sure exactly what the reason for the EH is.   I think I used to
> understand this, but I do not understand any more.  Perhaps Jason can
> explain it.

It isn't EH-specific, actually; it's necessary for cleanups in general.
Running cleanups is handled by the binding contour code in stmt.c.

  struct A { ~A(); };

  void f ()
    A a1;
    A a2;


Here, because of the label, we need a separate binding contour for a2.
Binding contours are generated through expand_{start,end}_bindings, which
we call when expanding a SCOPE_STMT, which are generated in sync with
front end binding levels.  If you want to do away with cleanup levels, you
need to come up with some other way to handle this.


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