[Bug c++/18733] [4.0 Regression] friend rejected
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Thu Dec 2 09:28:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-12-02 09:28 -------
Right, the whole template header check code is a mess across many files and
executed at different times. This works as a stop-gap:
Index: pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.945
diff -c -3 -p -r1.945 pt.c
*** pt.c 12 Nov 2004 21:47:08 -0000 1.945
--- pt.c 2 Dec 2004 09:25:16 -0000
*************** check_explicit_specialization (tree decl
*** 1739,1745 ****
tree dname = DECL_NAME (decl);
tmpl_spec_kind tsk;
! tsk = current_tmpl_spec_kind (template_count);
switch (tsk)
{
--- 1739,1753 ----
tree dname = DECL_NAME (decl);
tmpl_spec_kind tsk;
! if (is_friend)
! {
! if (!processing_specialization)
! tsk = tsk_none;
! else
! tsk = tsk_excessive_parms;
! }
! else
! tsk = current_tmpl_spec_kind (template_count);
switch (tsk)
{
I'm testing it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18733
More information about the Gcc-bugs
mailing list