[EMAIL PROTECTED] /tmp]$ /usr/misc/pkg/gcc-4.0.2/bin/g++ -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.2/configure --prefix=/usr/misc/pkg/gcc-4.0.2 --enable-shared --enable-threads=posix --with-system-zlib --with-gnu-as --with-as=/usr/misc/pkg/binutils-2.16/bin/as --with-gnu-ld --with-ld=/usr/misc/pkg/binutils-2.16/bin/ld --enable-__cxa_atexit --enable-languages=c,c++ Thread model: posix gcc version 4.0.2
Compile the following file: ========start of file========== template<class JT> struct JIG { template<class T> void io() {} }; template<class TT> struct TIG : public JIG<TT> { void m() { this->io<int>(); JIG<TT>::io<int>(); } }; ========end of file========== [EMAIL PROTECTED] /tmp]$ /usr/misc/pkg/gcc-4.0.2/bin/g++ foo2.cc foo2.cc: In member function void TIG<TT>::m(): foo2.cc:10: error: expected primary-expression before int foo2.cc:10: error: expected `;' before int foo2.cc:11: error: expected primary-expression before int foo2.cc:11: error: expected `;' before int This shows that an attempt to call io fails to parse. However, both calls above are valid calls. Making any of the above not a template allows the file to compile. This seems to be reproduced in the 3.4 series as well. -- Summary: Call to template method of template superclass of template does not parse Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jjamison at cs dot berkeley dot edu GCC build triplet: i686-linux-gnu GCC host triplet: i686-linux-gnu GCC target triplet: i686-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27209