From: Giovanni Bajo Date: Mon, 23 Feb 2004 05:10:37 +0000 (+0000) Subject: re PR c++/14143 (Overeager ADL) X-Git-Tag: releases/gcc-4.0.0~9928 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=146d3c99f076bb8a286d0bb002319ec3c591f8fd;p=thirdparty%2Fgcc.git re PR c++/14143 (Overeager ADL) PR c++/14143 * name-lookup.c (arg_assoc_class): Don't look into template arguments if it is not a primary template. From-SVN: r78287 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d8f31c3d36df..be8d7054e1fe 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,12 @@ +2004-02-23 Giovanni Bajo + + PR c++/14143 + * name-lookup.c (arg_assoc_class): Don't look into template + arguments if it is not a primary template. + 2004-02-20 John David Anglin - PR c++/12007 + PR c++/12007 * method.c (use_thunk): Always clone function argument tree. 2004-02-20 Mark Mitchell diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index be1b82283532..cbdcd1ba21e6 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4279,7 +4279,8 @@ arg_assoc_class (struct arg_lookup *k, tree type) return true; /* Process template arguments. */ - if (CLASSTYPE_TEMPLATE_INFO (type)) + if (CLASSTYPE_TEMPLATE_INFO (type) + && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type))) { list = INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (type)); for (i = 0; i < TREE_VEC_LENGTH (list); ++i)