> From: Dodji Seketeli <[email protected]>
> Date: Mon, 21 May 2012 15:55:19 +0200
> The location for a built-in macro token is BUILTIN_LOCATION. When we
> see that location value, we cannot know if that token was used in a
> system header or not. And that can trigger some unwanted warnings on
> e.g, the use of __LONG_LONG_MAX__ built-in macro in system headers
> when we compile with -pedantic, like in the test case accompanying
> this patch.
>
> In that case, I think we ought to look at the location for the
> expansion point of the built-in macro instead.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.
>
The ChangeLog entry is missing PR decoration (to make the
check-in automatically show up in the bug-report).
> libcpp/
>
PR preprocessor/53463
> * line-map.c (linemap_location_in_system_header_p): Check
> expansion point location for built-in macro tokens.
FWIW, this patch fixes the regressions noted in that PR. Thanks.
I don't have anything else to add to the discussion besides
uninformed bits like "why warn on language extensions for
built-in macros" or "why can't we (any longer?) see that the
location of use is in a system header when the error message
points at it".
brgds, H-P