The following reply was made to PR c++/8222; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , Cc: Subject: Re: c++/8222: [parser] call of member template inside template function Date: Thu, 1 May 2003 16:38:12 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8222 Reduced snippet: --------------------------- struct Foo { template void func() {} }; template void Bar(Foo* p) { p->func(); } int main() { Foo c; Bar(&c); } --------------------------- pr8222.cpp: In function `void Bar(Foo*)': pr8222.cpp:10: error: expected primary-expression pr8222.cpp:10: error: expected `;' The obvious workaround is to put the template keyword before func, as in "p->template func()". But ยง14.2p3 [temp.names] specifies that the keyword is compulsory only if the postfix-expression is dependent, which is not the case in the above snippet. So the above code is legal and should not be rejected. This might be a duplicate though, I think I saw a similar report somewhere. Confirmed on every GCC up to mainline 20030430. Giovanni Bajo