This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55252] Caret diagnostic doesn't show useful location when macro clashes with name in system header
- From: "dodji at seketeli dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Nov 2012 17:18:00 +0000
- Subject: [Bug c++/55252] Caret diagnostic doesn't show useful location when macro clashes with name in system header
- Auto-submitted: auto-generated
- References: <bug-55252-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55252
--- Comment #10 from dodji at seketeli dot org <dodji at seketeli dot org> 2012-11-19 17:18:00 UTC ---
"manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> a Ãcrit:
> 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.