2012/3/29 Jason Merrill <ja...@redhat.com>:
> On 03/08/2012 04:34 PM, Fabien Chêne wrote:
>>
>>        * decl.c (grokdeclarator): Call strip_using_decl.
>
>
> I would think we ought to be stripping USING_DECLs at a lower level, when we
> first look up the name in the parser.  They shouldn't make it as far as
> grokdeclarator.

Perhaps it is more correct like that, in cp_parser_set_decl_spec_type ?
Bootstrapped/tested x86_64-unknown-linux-gnu.

gcc/testsuite/ChangeLog

2012-04-07  Fabien Chêne  <fab...@gcc.gnu.org>

       PR c++/52465
       * g++.dg/lookup/using52.C: New.

gcc/cp/ChangeLog

2012-04-07  Fabien Chêne  <fab...@gcc.gnu.org>

       PR c++/52465
       * parser.c (cp_parser_class_name): Call strip_using_decl and
       perform some checks on the target decl.
        (cp_parser_set_decl_spec_type): Change its prototype so that the
        second argument be modifiable, and strip using declarations of
        that argument.
        (cp_parser_type_specifier): Adjust the calls to
        cp_parser_set_decl_spec_type.
        (cp_parser_simple_type_specifier): Likewise.
       * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
       to be stripped is NULL_TREE.
       (qualify_lookup): Call strip_using_decl and perform some checks on
       the target decl.

-- 
Fabien

Attachment: 52465_2.patch
Description: Binary data

Reply via email to