http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52529
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-08 08:31:16 UTC --- All error messages seems correct to me. template <typename T> long foo(typename T::X *x); 1/3) A<M>().foo(x); Where x is of some type. T cannot be deduced from T::X where T::X would be some type. 2) I already explained in comment #1. You are missing a template keyword. >all four variants compile under 4.5.3. Yes and it looks like GCC is actually better at rejecting invalid code.