https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65584
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> --- Since you closed PR102231 (which has a lot more detail), let me paste that here: <xmmintrin.h> includes <mm_malloc.h> unconditionally Instead, it should do something like #if __STDC_HOSTED__ #include <mm_malloc.h> #endif as Clang does, because <mm_malloc.h> only exists on hosted environments (which is good, because it itself uses <stdlib.h>, etc.) A few intrinsics that use stuff from <mm_malloc.h> need the same treatment. (apparently <mm_malloc.h> *is* created by GCC, but in the source tree it is pmm_malloc.h and gmm_malloc.h).