This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: swap does not compile
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>, bkoz at redhat dot com, Lars Gullik Bjønnes <larsbj at gullik dot net>, libstdc++ at gcc dot gnu dot org, jason at redhat dot com, gcc at gcc dot gnu dot org
- Date: 12 Jan 2004 17:12:31 -0800
- Subject: Re: swap does not compile
- Organization: CodeSourcery, LLC
- References: <m3llodldx6.fsf@tyfon.gullik.net> <m365fh7bwp.fsf@uniton.integrable-solutions.net> <m3d69plcvn.fsf@tyfon.gullik.net> <20040112123859.GA79416@compsoc.man.ac.uk> <or7jzx2lfu.fsf@free.redhat.lsd.ic.unicamp.br> <orr7y4vezp.fsf@free.redhat.lsd.ic.unicamp.br>
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