This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55252] Caret diagnostic doesn't show useful location when macro clashes with name in system header


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]