aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-02-23 05:10:37 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-02-23 05:10:37 +0000
commit146d3c99f076bb8a286d0bb002319ec3c591f8fd (patch)
treefadbcb3353d05ee8e4dd6997e553a7174a1e31fe /gcc
parentc5f7ba9ee7fb7ee30277a147798ab808762a894e (diff)
downloadgcc-146d3c99f076bb8a286d0bb002319ec3c591f8fd.zip
gcc-146d3c99f076bb8a286d0bb002319ec3c591f8fd.tar.gz
gcc-146d3c99f076bb8a286d0bb002319ec3c591f8fd.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/name-lookup.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d8f31c3..be8d705 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,6 +1,12 @@
+2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ 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 <dave.anglin@nrc-cnrc.gc.ca>
- PR c++/12007
+ PR c++/12007
* method.c (use_thunk): Always clone function argument tree.
2004-02-20 Mark Mitchell <mark@codesourcery.com>
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index be1b822..cbdcd1b 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)