From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4634 invoked by alias); 28 Jan 2003 02:36:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4620 invoked by uid 71); 28 Jan 2003 02:36:00 -0000 Date: Tue, 28 Jan 2003 02:36:00 -0000 Message-ID: <20030128023600.4619.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Farfetch'd" Subject: Re: c++/9460: parse error on template member function Reply-To: "Farfetch'd" X-SW-Source: 2003-01/txt/msg01560.txt.bz2 List-Id: The following reply was made to PR c++/9460; it has been noted by GNATS. From: "Farfetch'd" To: , , , , Cc: Subject: Re: c++/9460: parse error on template member function Date: Tue, 28 Jan 2003 03:34:27 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=9460 I am not absolutely sure there is no bug here. For example, look at the following snippet: ------------ struct Foo { template void F1(void) {} }; template struct Bar { void F2(void) { Foo f; f.F1(); } template void F1(void) {} }; template Bar; ------------ The previous snippet is accepted by G++ but it shouldn't since it's not legal. The compiler is fooled by Bar::F1<> having the same name of Foo::F1<>. Also the following code is accepted as well and should not: ------------ struct Foo { template void F1(void) {} }; template struct Bar { void F2(void) { Foo().F1(); } }; template Bar; ------------ since it's still missing the template keyword in the member template call. So it's not a case of reject-legal, but of accept-illegal. Giovanni Bajo