This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH for 3.3] Fix PR10849
On Tue, 2003-07-08 at 05:56, Kriang Lerdsuwanakij wrote:
> Mark Mitchell wrote
>
> >
> >Thanks for working on this. Dealing with the old parser is so
> >unappetizing...
> >
> >I'm not sure why you're setting *new_type_p the way you do; that's
> >supposed to be set if a new type is being declared (i.e., if a
> >class-head, rather than an elaborated-type-specifier, is being
> >processed). Why is the logic you used right?
> >
> >Also, where is the pop_scope() corresponding to the push_scope() you
> >added? Is there any way that you could cue the disabling off of
> >maybe_process_partial_specialization?
> >
> This particular use of 'new_type_flag' is for case like
>
> class A::B {
> ...
> };
>
> where 'A' is a class or namespace. So inside the definition of this
> class, name lookup is performed in the scope of 'A'. Also this
> affects access checking of the class head 'A::B' itself. The
> 'new_type_flag' is checked later in 'finish_class_definition'
> called by 'structsp' non-terminal. So the 'pop_scope' is actually
> inside that function.
Thanks for explaining. This patch is fine -- please check it in.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com