This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++: Tag transparent binding contour
On Fri, 2003-09-19 at 11:23, Jason Merrill wrote:
> On Fri, 19 Sep 2003 01:47:24 -0700, "Mark Mitchell" <mark@codesourcery.com> 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;
> label:
> A a2;
>
> ...
> }
Can you go into more detail? How does the label effect anything about
cleanups?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com