https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16233
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2012-04-12 11:50:00 |2015-9-18
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> Confirmed, here is shorter example:
> template<typename V> void B(V a)
> {
> a.Foo<int> ();
> }
We still give the same error, just with a caret location now:
templ.cc: In function ‘void B(V)’:
templ.cc:3:9: error: expected primary-expression before ‘int’
a.Foo<int> ();
^
templ.cc:3:9: error: expected ‘;’ before ‘int’
whereas Clang is much better:
templ.cc:3:5: error: use 'template' keyword to treat 'Foo' as a dependent
template name
a.Foo<int> ();
^
template
1 error generated.