This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18733] [4.0 Regression] friend rejected
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2004 09:28:11 -0000
- Subject: [Bug c++/18733] [4.0 Regression] friend rejected
- References: <20041130043812.18733.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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