------- Comment #21 from manu at gcc dot gnu dot org 2010-04-18 16:16 ------- (In reply to comment #20) > (In reply to comment #19) > > Well, the patch is mostly done, it reduces the output from 11 to 1 lines > > and it > > neatly points out where is the recursive instantiation. So I hope you may > > reconsider, unless you think the 101 lines are useful to the user somehow. > > 101 lines? Is that a typo?
Yes, sorry. I meant 11 lines. > If this change only applies to the case where all 11 lines would be > instantiations of the same template I guess it sounds reasonable, though the > 11-line output seems a bit clearer as to where the recursion is happening. > Perhaps two instantiation lines in this case so we see the first recursion? My current patch prints: /home/manuel/src/pr9335.C:2:36: error: template instantiation depth exceeds maximum of 1024 (use -ftemplate-depth= to increase the maximum) instantiating 'struct X<-0x00000000000000018>' /home/manuel/src/pr9335.C:2:36: recursively instantiated from 'const int X<1000>::value' /home/manuel/src/pr9335.C:4:17: instantiated from here Is that ok or you would prefer the following? /home/manuel/src/pr9335.C:2:36: error: template instantiation depth exceeds maximum of 1024 (use -ftemplate-depth= to increase the maximum) instantiating 'struct X<-0x00000000000000018>' /home/manuel/src/pr9335.C:2:36: recursively instantiated from 'const int X<N-1>::value' /home/manuel/src/pr9335.C:2:36: recursively instantiated from 'const int X<1000>::value' /home/manuel/src/pr9335.C:4:17: instantiated from here I think with some tinkering I can reach that output but I don't see which useful information provides, since the location of the extra line is the same as the error line and the recursive instantiation line. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9335