[Bug target/65584] [i386] Intrinsics inclusion with `-nostdinc' failing due to `stdlib.h' dependency
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 7 15:41:16 GMT 2021
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).
More information about the Gcc-bugs
mailing list