http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44783
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-14 14:44:03 UTC --- Agreed about the testcase, of course. By the way, for the actual dejagnu testcase, a few weeks ago I noticed that apparently testing for 'note:' is pretty weak, like if additional notes are emitted (additional in the sense that there is no corresponding dg-message to match) that doesn't lead to failure. Did you see anything like that? 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.