From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17215 invoked by alias); 5 Apr 2012 22:06:19 -0000 Received: (qmail 17206 invoked by uid 22791); 5 Apr 2012 22:06:18 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Apr 2012 22:06:06 +0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/24985] caret diagnostics Date: Thu, 05 Apr 2012 22:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00392.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24985 --- Comment #24 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 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. >=20 > So it does. Bizarre. >=20 > set comp_output [string trimleft $comp_output] >=20 > I guess we can just remove the initial space from that prune pattern. >=20 > > The problem is that the default regexp of DejaGNU is: > >=20 > > "(^|\n)(\[^\n\]+$line\[^\n\]*($pattern)\[^\n\]*\n?)+" > >=20 > > the "+" at the end means that it matches as many lines as possible. >=20 > Yes, but only lines that match the line number followed by the pattern; t= he > 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 seem= s 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 thi= s be true or am I doing something wrong? I am starting to reconsider adding -fno-diagnostics-show-caret everywhere.