------- Comment #4 from manu at gcc dot gnu dot org 2010-04-28 08:46 ------- The output is now:
$ cc1plus pr43113.C -ftemplate-depth=10 pr43113.C:7:11: error: template instantiation depth exceeds maximum of 10 (use -ftemplate-depth= to increase the maximum) instantiating struct A<A<A<A<A<A<A<A<A<A<A<B>::S>::S>::S>::S>::S>::S>::S>::S>::S>::S> pr43113.C:7:11: recursively instantiated from A<A<B>::S> pr43113.C:7:11: instantiated from A<B> pr43113.C:10:20: instantiated from here pr43113.C:7:11: error: A< <template-parameter-1-1> >::ht has incomplete type pr43113.C:5:8: error: declaration of struct A<A<A<A<A<A<A<A<A<A<A<B>::S>::S>::S>::S>::S>::S>::S>::S>::S>::S> The template-parameter-1-1 is wrong, not sure what is going on there. We could avoid the two long lines by not printing the full instantiation, only the first recursion, that is, just 'struct A<A<B>::S>' -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43113