This is the mail archive of the
mailing list for the glibc project.
[Bug libc/25189] glibc's __glibc_has_include causes issues with clang -frewrite-includes
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 22 Nov 2019 12:28:29 +0000
- Subject: [Bug libc/25189] glibc's __glibc_has_include causes issues with clang -frewrite-includes
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.30/master branch has been updated by Florian Weimer
Author: Emilio Cobos �lvarez <email@example.com>
Date: Tue Nov 12 19:18:32 2019 +0100
Don't use a custom wrapper macro around __has_include (bug 25189).
This causes issues when using clang with -frewrite-includes to e.g.,
submit the translation unit to a distributed compiler.
In my case, I was building Firefox using sccache.
See  for a reduced test-case since I initially thought this was a
clang bug, and  for more context.
Apparently doing this is invalid C++ per [cpp.cond], which mentions :
> The #ifdef and #ifndef directives, and the defined conditional
> inclusion operator, shall treat __has_include and __has_cpp_attribute
> as if they were the names of defined macros. The identifiers
> __has_include and __has_cpp_attribute shall not appear in any context
> not mentioned in this subclause.
(cherry picked from commit bfa864e1645e140da2e1aae3cf0d0ba0674f6eb5)
You are receiving this mail because:
You are on the CC list for the bug.