This code: template<typename T> class foo{ };
int main() { foo<int> i; foo<foo<int> j; int k; int l; foo<int> m; return 0; } gets you: ~/ootbc/sim/sandbox$ g++ foo.cc foo.cc: In function 'int main()': foo.cc:8: error: template argument 1 is invalid foo.cc:8: error: invalid type in declaration before ';' token ~/ootbc/sim/sandbox$ fg The real problem is a missing ">" three lines earlier. -- Summary: bad diagnostic Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32190