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++/21696] New: definition not defined to linker


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


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