aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-11-05 22:33:06 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-11-05 22:33:06 -0500
commit2395cd2e91cda97a8d0bad70134f12534d4d3562 (patch)
tree36c863cb57d29cf3f39f10511e26315ffeb25b90 /gcc/cp
parent9d79aec3134c59555a81daef276e5cde380688e6 (diff)
downloadgcc-2395cd2e91cda97a8d0bad70134f12534d4d3562.zip
gcc-2395cd2e91cda97a8d0bad70134f12534d4d3562.tar.gz
gcc-2395cd2e91cda97a8d0bad70134f12534d4d3562.tar.bz2
re PR c++/34870 (argument-dependent lookup fails to find friend declaration)
PR c++/34870 * name-lookup.c (arg_assoc_class): Call complete_type. * pt.c (instantiate_class_template): Call uses_template_parms instead of dependent_type_p. From-SVN: r153958
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/pt.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a2d44dc..0dfc57f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2009-11-05 Jason Merrill <jason@redhat.com>
+ PR c++/34870
+ * name-lookup.c (arg_assoc_class): Call complete_type.
+ * pt.c (instantiate_class_template): Call uses_template_parms
+ instead of dependent_type_p.
+
PR c++/41703
* pt.c (check_undeduced_parms): New subroutine of...
(more_specialized_fn): ...here. Undeduced template parms can make
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index c3f742e..14f9787 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -4780,6 +4780,8 @@ arg_assoc_class (struct arg_lookup *k, tree type)
if (arg_assoc_namespace (k, context))
return true;
+ complete_type (type);
+
if (TYPE_BINFO (type))
{
/* Process baseclasses. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 74273eb..d4556cd 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7358,7 +7358,7 @@ instantiate_class_template (tree type)
if (TYPE_BEING_DEFINED (type)
|| COMPLETE_TYPE_P (type)
- || dependent_type_p (type))
+ || uses_template_parms (type))
return type;
/* Figure out which template is being instantiated. */