Dear all, I would like to post a bug report for the GNU C/C++ compiler 3.3-e500.
We use the compiler to generate code for a PowerPC processor. Used invokation line for the GNU C++ compiler: ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig -fmerge-templates -mmultiple -mno-string -mstrict-align -O3 -fno-exceptions -fno-rtti -fno-builtin-printf -I<some include paths> -D<some #define's> X.CPP -oX.O // file X.CPP template <typename T_> T_ f1 (const T_* p) // function #1 { return p[1]; } template <typename R_, typename T_> R_ f1 (const T_* p) // function #2 { return p[2]; } float f (const int* p) { return f1<int>(p); } // "f1<int>(const int*)" or // "f1<int,int>(const int*)" ? The compiler doesn't recognize that the call to f1() is ambiguous and it selects function #2. (BTW, Comeau online rejects the code fragment above.) Kind regards W. Roehrl -- Summary: Unrecognized ambiguity in function overloading Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wolfgang dot roehrl at gi-de dot com GCC build triplet: sparc-sun-solaris2.5.1 GCC host triplet: i386-pc-mingw32 GCC target triplet: powerpc-wrs-vxworks http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31597