This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11567] New: C++ code containing templated member function with same name as pure virtual member function results in linking failure


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]