http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57201

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-05-08 
14:23:07 UTC ---
(In reply to comment #7)
> the comment for function linemap_location_in_system_header_p
> in libcpp/line-map.c says:
> /* // snip
>    Note that this function returns 1 if LOCATION belongs to a token
>    that is part of a macro replacement-list defined in a system
>    header, but expanded in a non-system file.  */
> 
> so this behavior is intentional?

Yes. The idea is that if some piece of code gives a warning inside a macro in a
system-header, we should not warn. See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7263#c8

I don't see how to reconcile this with --save-temps, unless we mark in the
preprocessed code what was expanded from a system header.

Interestingly, clang behaves the same, I guess following the same reasoning.

Reply via email to