This is the mail archive of the gcc@gcc.gnu.org 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: swap does not compile


On Mon, 2004-01-12 at 17:01, Alexandre Oliva wrote:
> On Jan 12, 2004, Alexandre Oliva <aoliva@redhat.com> wrote:
> 
> > Not really.  cp_parser_name_lookup_name_simple() can return to
> > cp_parser_using_declaration() an overload involving functions in more
> > than one namespace, but then do_{local,toplevel}_using_decl() call
> > validate_nonmember_using_decl() that extracts the scope from the first
> > overload only.
> 
> This patch is an attempt to fix the bug.  The one bit I'm not sure of
> is whether parser->qualifying_scope is guaranteed to still hold the
> correct value at the point I use it.  Would someone more familiar with
> the new parser please have a double check?

This is probably OK -- but it would be more reliable to just get the
return value from cp_parser_nested_name_specifier_{,opt}.  They will
return the qualifying scope for you. :-)

With that change, the patch is OK.

And thanks!  That's much better than a PR in Bugzilla. :-)
________________________________________________________________________
-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC


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