This is the mail archive of the gcc-patches@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: [C++ Patch] for c++/52465


2012/3/29 Jason Merrill <jason@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  <fabien@gcc.gnu.org>

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

gcc/cp/ChangeLog

2012-04-07  Fabien Chêne  <fabien@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


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