This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11567] New: C++ code containing templated member function with same name as pure virtual member function results in linking failure
- From: "albert at stonethree dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2003 08:04:03 -0000
- Subject: [Bug c++/11567] New: C++ code containing templated member function with same name as pure virtual member function results in linking failure
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11567
Summary: C++ code containing templated member function with same
name as pure virtual member function results in linking
failure
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: albert at stonethree dot com
CC: gcc-bugs at gcc dot gnu dot org
Attached C++ code contains a pure virtual function, unpack(), and a a templated
function of the same name (but with different arguments). The presence of the
templated function causes linking to fail. Changing the name of the templated
function results in successful linking.
Implementing the unmarshal() (which calls the pure virtual function, which
should result in a call to unpack() implemented in the derived class) function
in the header also allows for successful linking, but I think this only hides
the bug.