From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19654 invoked by alias); 15 Jul 2014 16:32:27 -0000 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 Received: (qmail 19553 invoked by uid 48); 15 Jul 2014 16:32:23 -0000 From: "tromey at gcc dot gnu.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: Tue, 15 Jul 2014 16:32: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-Version: 4.8.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00998.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55252 --- Comment #16 from Tom Tromey --- I've tripped across this enough that I've actually filed dups twice now. I think it would be best to change the ordering here. That is, the initial error ought to generally be the location of the outermost expansion. Then, the remaining notes ought to delineate the macro expansions. While it is true that this will yield a sub-optimal result in some cases, I think that it will have better results in the preponderance of cases. That is, there's no way to be perfect here but gcc could be more useful.