This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21696] New: definition not defined to linker
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2005 10:01:01 -0000
- Subject: [Bug c++/21696] New: definition not defined to linker
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the attached source there are several definitions of the form:
template<>
checker<reader>
subBuff<reader>::checks;
As shown in the attached output from "nm", these are reported in the .o file as
references not definitions:
U _ZN7subBuffI6readerE6checksE
However, if the definition is explicitly initialized as in:
template<>
checker<phiz>
subBuff<phiz>::checks = checker<phiz>();
then the nm output shows that it is defined:
00000062 B _ZN7subBuffI4phizE6checksE
These should all be reported as definitions.
Ivan
--
Summary: definition not defined to linker
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21696