From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2118 invoked by alias); 2 Dec 2004 09:28:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2078 invoked by uid 48); 2 Dec 2004 09:28:11 -0000 Date: Thu, 02 Dec 2004 09:28:00 -0000 Message-ID: <20041202092811.2077.qmail@sourceware.org> From: "giovannibajo at libero dot it" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041130043812.18733.pinskia@gcc.gnu.org> References: <20041130043812.18733.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18733] [4.0 Regression] friend rejected X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg00273.txt.bz2 List-Id: ------- 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