From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 950 invoked by alias); 12 Oct 2012 13:53:09 -0000 Received: (qmail 883 invoked by uid 48); 12 Oct 2012 13:52:47 -0000 From: "thomas.prescher at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54909] New: gcc does not recognize member function template when identical named pure virtual method exists Date: Fri, 12 Oct 2012 13:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thomas.prescher at intel dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01183.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54909 Bug #: 54909 Summary: gcc does not recognize member function template when identical named pure virtual method exists Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: thomas.prescher@intel.com Created attachment 28432 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D28432 test case Hello, I've found the following issue: Assume you have a class A which has a pure-virtual method called foo which gets one parameter. Furthermore, assume that A implements a template method also called foo, which expects 0 arguments and has a template depended retu= rn type. Class B inherits from A and implements foo with one parameter. When you call foo without parameter on an instance of B, gcc complains that= it expects a parameter, even if the template type is passed. This is the error message, an example implementation is attached. main.cc:33:20: error: expected primary-expression before =E2=80=98>=E2=80= =99 token main.cc:33:22: error: expected primary-expression before =E2=80=98)=E2=80= =99 token