C++: Tag transparent binding contour

Jason Merrill jason@redhat.com
Tue Jun 3 17:02:00 GMT 2003


On 03 Jun 2003 17:59:43 +0200, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:

> Code copied from the C front-end have the notion of "tag-transparent
> binding contour", which means that a tag (in C++ speak, a user-defined type)
> declared/defined inside that binding contour propagates uplevel, as if
> that binding contour did not exist, until it reachs a
> non-tag-transparent one.
>
> That notion is not really useful for C++, and it can be derived from
> the categorization made by scope_kind.  

> The only place, in the C++ front-end, where a tag-transparent binding
> contour is created in maybe_push_cleanup_level, where I think it is
> unnecessary.  Comments?

Well, if we're in the middle of a block and we want to push a new binding
level in order to support cleanup semantics, we don't want that binding
level to interfere with name lookup.  But I don't see how that would be
different for tags vs. other names.  Indeed, since C++ doesn't have
separate name spaces for tags and decls, having any special handling of
tags doesn't make a lot of sense.

Jason



More information about the Gcc mailing list