https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88210
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Even without a fix-it, "has not been declared" would be more helpful than "is not a template". Clang is more informative (although wrong about the instantiation needing to occur in namespace x): expl.cc:5:23: error: no template named 'blah'; did you mean 'x::blah'? extern template class blah<int>; ^~~~ x::blah expl.cc:2:31: note: 'x::blah' declared here template<typename T> struct blah { }; ^ expl.cc:5:23: error: explicit instantiation of 'x::blah' must occur in namespace 'x' extern template class blah<int>; ^ expl.cc:2:31: note: explicit instantiation refers here template<typename T> struct blah { }; ^ expl.cc:7:16: error: no template named 'blah'; did you mean 'x::blah'? template class blah<int>; ^~~~ x::blah expl.cc:2:31: note: 'x::blah' declared here template<typename T> struct blah { }; ^ expl.cc:7:16: error: explicit instantiation of 'x::blah' must occur in namespace 'x' template class blah<int>; ^ expl.cc:2:31: note: explicit instantiation refers here template<typename T> struct blah { }; ^ 4 errors generated.