If you compile the attached code using g++ 4.0.x using the following command:

> g++ -v -save-temps -O3 -c bug.cpp

and look at the list of symbols in the bug.o file using the following command:

> nm bug.o

You will see that g++ generates a symbol for
'PxlMonoLimit<(PxlFormat)0>::limit'. IMHO, there is no reason to generate such
a symbol. g++ 3.4.x do not generate one.

Thank you,
Etienne Clement


-- 
           Summary: Template instantiation problem - Different behavior
                    between gcc 4.0.x and gcc 3.4.x.
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: etienne dot clement at autodesk dot com
 GCC build triplet: powerpc-apple-darwin8
  GCC host triplet: i686-apple-darwin8
GCC target triplet: i686-apple-darwin8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29219

Reply via email to