Bug 23869 – ImportC: undefined identifier `isfinite`

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2023-04-29T21:20:48Z
Last change time
2023-04-30T23:00:08Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Lance Bachmeier
See also
https://issues.dlang.org/show_bug.cgi?id=23867

Comments

Comment #0 by lance — 2023-04-29T21:20:48Z
This code if (!R_FINITE(x)) return x; expands to if (!__builtin_isfinite (x)) return x; It is fixed by adding this to the .c file: #define __builtin_isfinite finite
Comment #1 by lance — 2023-04-29T21:22:02Z
The compilation error message is Error: undefined identifier `__builtin_isfinite`
Comment #2 by bugzilla — 2023-04-30T05:20:01Z
Comment #3 by dlang-bot — 2023-04-30T21:15:14Z
@bachmeil updated dlang/dmd pull request #15147 "Fix 23867 and 23869" fixing this issue: - Fix issues 23867 and 23869 - define __builtin_isfinite and __builtin_isnan These GNU C builtins are referenced by macros such as: * ISNAN * R_FINITE https://github.com/dlang/dmd/pull/15147
Comment #4 by dlang-bot — 2023-04-30T23:00:08Z
dlang/dmd pull request #15147 "Fix 23867 and 23869" was merged into master: - 812fd8a5fa5fb04c5d48e10a57905d5a39f39f13 by Lance Bachmeier: Fix issues 23867 and 23869 - define __builtin_isfinite and __builtin_isnan These GNU C builtins are referenced by macros such as: * ISNAN * R_FINITE https://github.com/dlang/dmd/pull/15147