2012/4/7 Jason Merrill <ja...@redhat.com>: > On 04/07/2012 11:37 AM, Fabien Chêne wrote: >> >> Perhaps it is more correct like that, in cp_parser_set_decl_spec_type ? > > Even that seems late. Why not just return the target decl from > cp_parser_class_name?
Ah yes, that's slightly better. (I've kept the NULL check in strip_using_decl, it seems safer to me. Just tell me if you prefer not) Tested x86_64-unkown-linux-gnu. OK for trunk and 4.7 ? gcc/testsuite/ChangeLog 2012-03-08 Fabien Chêne <fab...@gcc.gnu.org> PR c++/52465 * g++.dg/lookup/using52.C: New. gcc/cp/ChangeLog 2012-03-08 Fabien Chêne <fab...@gcc.gnu.org> PR c++/52465 * decl.c (grokdeclarator): Call strip_using_decl. * parser.c (cp_parser_class_name): Call strip_using_decl and perform some checks on the target decl. * 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
52465_3.patch
Description: Binary data