https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116827
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #3)
> where that new USE_CLANG_TYPES macro is defined at the top of the file:
>
> ----
> #if defined(__has_feature) && __has_feature(modules)
This is a bug. If __has_feature is _not_ define, then __has_feature(modules)
would not compile:
hf.c:1:44: error: missing binary operator before token "("
1 | #if defined(__has_feature) && __has_feature(uhoh)
| ^
This needs to be reported to Apple. Either they should just assume
__has_feature works and not bother checking if it's defined, or check for it
properly.
> #define USE_CLANG_TYPES 1
> #else
> #define USE_CLANG_TYPES 0
> #endif
It looks like the header now assumes that if __has_feature(modules) is true,
then they're compiling with Clang. Which is not true because GCC supports
__has_feature now.
So I think this needs a fixincludes change for GCC to be able to use these new
SDK headers.
> I'm thoroughly confused by this series of includes, especially as
> __need_ptrdiff_t is never used anywhere in the SDK.
GCC's stddef.h uses it.