[Issue 22535] New: ImportC: gcc/clang math intrinsics are rejected.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 22 06:01:17 UTC 2021
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: nobody at puremagic.com
Reporter: dave287091 at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list