http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51641
--- Comment #4 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-03-13 21:25:26 UTC --- Author: dodji Date: Tue Mar 13 21:25:22 2012 New Revision: 185357 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185357 Log: PR c++/51641 - Lookup finds enclosing class member instead of template parameter gcc/cp/ PR c++/51641 * cp-tree.h (template_type_parameter_p): Declare new function. (parameter_of_template_p): Remove * pt.c (template_type_parameter_p): Define new function. (parameter_of_template_p): Remove. * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely on parameter_of_template_p anymore. Compare the level of the template parameter to the depth of the template. gcc/testsuite/ PR c++/51641 * g++.dg/lookup/hidden-class17.C: New test. Conflicts: gcc/cp/pt.c Added: trunk/gcc/testsuite/g++.dg/lookup/hidden-class17.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/name-lookup.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog