[Bug c++/24985] caret diagnostics
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 5 22:06:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985
--- Comment #24 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-05 22:05:15 UTC ---
(In reply to comment #23)
> (In reply to comment #22)
> > * DejaGNU trims leading whitespace before passing the text to prune.
>
> So it does. Bizarre.
>
> set comp_output [string trimleft $comp_output]
>
> I guess we can just remove the initial space from that prune pattern.
>
> > The problem is that the default regexp of DejaGNU is:
> >
> > "(^|\n)(\[^\n\]+$line\[^\n\]*($pattern)\[^\n\]*\n?)+"
> >
> > the "+" at the end means that it matches as many lines as possible.
>
> Yes, but only lines that match the line number followed by the pattern; the
> source line shouldn't have its own line number before the pattern.
There are a few dg- directives with line number 0. They match everywhere.
Another problem with c99-vla-jump-3.c and similar testcases is that it seems as
if DejaGNU limits the output (or has a limited size buffer for text) and
decides to stop parsing in the middle of a source line, which breaks the
pruning (and misses several diagnostics that need to be matched). Could this be
true or am I doing something wrong?
I am starting to reconsider adding -fno-diagnostics-show-caret everywhere.
More information about the Gcc-bugs
mailing list