https://issues.dlang.org/show_bug.cgi?id=22535
Issue ID: 22535
Summary: ImportC: gcc/clang math intrinsics are rejected.
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
math.h on macOS uses the following gcc/clang builtins:
`__builtin_fabs`
`__builtin_fabsf`
`__builtin_fabsl
`__builtin_fabsl`
`__builtin_inf`
`__builtin_inff`
`__builtin_infl`
A much larger list of these builtins are described here:
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
It’s common for this header to be directly or transitively included. It is
possible at least on macOS to avoid these if you preprocess with the
-ffast-math flag as then it will counterintuitively declare extern versions of
functions like isfinite instead of defining them as inline functions using
these intrinsics.
I don’t know if we want dmd to actually recognize all of these intrinsics.
--