From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18271 invoked by alias); 19 Nov 2012 17:18:30 -0000 Received: (qmail 16786 invoked by uid 55); 19 Nov 2012 17:18:02 -0000 From: "dodji at seketeli dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55252] Caret diagnostic doesn't show useful location when macro clashes with name in system header Date: Mon, 19 Nov 2012 17:18: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: normal X-Bugzilla-Who: dodji at seketeli dot 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-11/txt/msg01792.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55252 --- Comment #10 from dodji at seketeli dot org = 2012-11-19 17:18:00 UTC --- "manu at gcc dot gnu.org" a =C3=A9crit: > The idea seems good. It would also handle comment #4 testcase. Yeah, and I think it would be a step in the direction of printing ranges for expressions. I know you and I share a (not so) secret dream of seeing taht in GCC one day. :-) > However, I am not sure how you would implement this. That is the real issue, I guess. I suspect this could be like opening a can of worms. In G++, I guess I'd start with updating the hypothetical 'current expression' variable in cp_parser_expression. But then we need to handle tentative parsing. That is, if we are in a tentative parse, save the new 'current expression' on the side, and really save it when the parse is committed. And pray for the fall-outs to not be in the order of dozens. :-) > different issue is why the macro unwinder cares about system-headers? See > comment #3. Right, I have replied to that in an earlier comment. Thanks.