This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44783] implement -ftemplate-backtrace-limit=
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Feb 2012 14:27:40 +0000
- Subject: [Bug c++/44783] implement -ftemplate-backtrace-limit=
- Auto-submitted: auto-generated
- References: <bug-44783-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44783
--- Comment #9 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-02-14 14:27:40 UTC ---
(In reply to comment #7)
> Thanks Manuel. Thus, I'm going to test your patch. Was wondering, maybe we want
> the nit: 'n_total > template_backtrace_limit + 2' n the condition, in order to
> keep by default exactly the current behavior?
This is why I wanted a testcase. The ones that are in the testsuite from when I
added this behaviour do not trigger the "skipping message" anymore, since later
I implemented recognizing the recursive template (which is much nicer IMHO). So
we need a testcase that triggers this (like a very deep instantiation or
something that the recursion detection cannot handle).
n_total >= 12 == n_total > template_backtrace_limit + 1
The +1 is basically giving enough space, so at least we always print 2 template
instantiations, one before and one after the "skipping". However, if
template_backtrace_limit=1 and n_total = 2, should we print just 1 (new patch)
or still 2 (old behavior)? This was not a problem before because
template_backtrace_limit was always 10.
> Otherwise, shall I send the patch to the mailing list for you? Thanks again.
Yes, please. Feel free also to edit it or completely modify it. Thanks.