[PATCH] c++: Fix location for -Wunused-macros [PR66290]

2022-07-28 Thread Lewis Hyatt via Gcc-patches
In C++, since all tokens are lexed from libcpp up front, diagnostics generated by libcpp after lexing has completed do not get a valid location from libcpp (rather, libcpp thinks they all pertain to the end of the file.) This has long been addressed using the global variable "done_lexing", which t

Re: [PATCH] c++: Fix location for -Wunused-macros [PR66290]

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/28/2022 8:01 AM, Lewis Hyatt via Gcc-patches wrote: In C++, since all tokens are lexed from libcpp up front, diagnostics generated by libcpp after lexing has completed do not get a valid location from libcpp (rather, libcpp thinks they all pertain to the end of the file.) This has long be