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
Created attachment 12325 [details] Program causing the problem. 1- Compile using the following command: > g++ -v -save-temps -O3 -c bug.cpp Use the following command to see that a symbol is generated for 'PxlMonoLimit<(PxlFormat)0>::limit'. > nm bug.o 2- Compile using the following command: > g++ -v -save-temps -O3 -DWORK -c bug.cpp Use the following command to see that no symbol for 'PxlMonoLimit<(PxlFormat)0>::limit' is generated. > nm bug.o
This is not a bug. THis is a dup of bug 20547. *** This bug has been marked as a duplicate of 20547 ***