public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/44783] implement -ftemplate-backtrace-limit=
Date: Tue, 14 Feb 2012 16:46:00 -0000	[thread overview]
Message-ID: <bug-44783-4-eOmWvqMIdW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44783-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44783

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-14 16:45:20 UTC ---
> Any number of notes will be matched by a single "note:" test, since the
> testsuite does not detect duplicates. There is PR about this somewhere.

I'm not sure the issue is just about duplicates. I know that. I'm afraid there
is more, like if a testcase doesn't have *any* dg-message markup it can pass,
like the actual *text* in a dg-message doesn't matter, things like that. I can
easily provide examples of the former, probably as easily the latter too.

> > Anyway, about the code, if I understand correctly your explanation, 'n_total >
> > template_backtrace_limit + 1' would lead to the exact same default behavior we
> > have now, but appears to misbehave a little when template_backtrace_limit == 1
> > and n_total == 2 because we really want 1 note in that case, that is what the
> > user really asked, right? Then probably what you wrote in the draft is fine,
> > but I don't have a strong opinion, really, I only noticed something 'weird'
> > going on with that condition and decided to ask.
> 
> So I used the testcase testsuite/g++.dg/cpp0x/noexcept15.C to play a bit. 
> 
> I noticed that my earlier version never prints "skipping 1 instantiation
> contexts". Now I recall that this was done on purpose. It seems pointless to
> print a line "skipping 1" instead of the actual instantiation context. Also, we
> don't have to deal with singular/plural. ;-)
> 
> However, this means that in some cases, we would actually print one more than
> the limit. If we just say that the limit is a limit not the exact number
> printed, a workaround is to print one less in that case. So:
> 
> limit n_total printed skipped
> 5     5       5       0
> 5     7       5       2
> 5     6       4       2
> 
> I also added the option name to the message for convenience (clang also does
> this if I recall correctly).

Ok. I'm going to regtest the updated draft. Note, in general '&&' goes always
in a new line; also cut & pasting in the trail often leads to diffs hard to
manage, better attaching, imo.


  parent reply	other threads:[~2012-02-14 16:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44783-4@http.gcc.gnu.org/bugzilla/>
2011-09-25 15:22 ` paolo.carlini at oracle dot com
2011-09-26 18:34 ` jason at gcc dot gnu.org
2011-10-17 18:16 ` paolo.carlini at oracle dot com
2012-02-13  1:07 ` gredner at gmail dot com
2012-02-13  8:57 ` paolo.carlini at oracle dot com
2012-02-13 17:11 ` manu at gcc dot gnu.org
2012-02-14 11:15 ` paolo.carlini at oracle dot com
2012-02-14 12:37 ` paolo.carlini at oracle dot com
2012-02-14 14:28 ` manu at gcc dot gnu.org
2012-02-14 14:45 ` paolo.carlini at oracle dot com
2012-02-14 16:27 ` manu at gcc dot gnu.org
2012-02-14 16:46 ` paolo.carlini at oracle dot com [this message]
2012-02-15 15:57 ` paolo.carlini at oracle dot com
2012-03-15 10:00 ` paolo at gcc dot gnu.org
2012-03-15 10:04 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-44783-4-eOmWvqMIdW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).