* pt.c (check_explicit_specialization): Use special logic to validate
befriended specializations.
PR c++/18733
* g++.dg/template/friend33.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92527
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/18733
+ * pt.c (check_explicit_specialization): Use special logic to validate
+ befriended specializations.
+
2004-12-22 Mark Mitchell <mark@codesourcery.com>
* rtti.c (emit_support_tinfos): Avoid using C99 semantics.
tree dname = DECL_NAME (decl);
tmpl_spec_kind tsk;
- tsk = current_tmpl_spec_kind (template_count);
+ if (is_friend)
+ {
+ if (!processing_specialization)
+ tsk = tsk_none;
+ else
+ tsk = tsk_excessive_parms;
+ }
+ else
+ tsk = current_tmpl_spec_kind (template_count);
switch (tsk)
{
+2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/18733
+ * g++.dg/template/friend33.C: New testcase.
+
2004-12-22 Mark Mitchell <mark@codesourcery.com>
PR c++/18464
--- /dev/null
+// { dg-do compile }
+// PR c++/18733: Validation of template headers in friends
+
+template<int> struct A
+{
+ void foo();
+};
+
+struct B
+{
+ friend void A<0>::foo();
+};