digitalmars.D.bugs - [Issue 23867] New: ImportC: undefined identifier `__builtin_isnan`
- d-bugmail puremagic.com (29/29) Apr 29 2023 https://issues.dlang.org/show_bug.cgi?id=23867
https://issues.dlang.org/show_bug.cgi?id=23867 Issue ID: 23867 Summary: ImportC: undefined identifier `__builtin_isnan` Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: lance lancebachmeier.com The failing C code is if (ISNAN(df) || df <= 0.0) ML_WARN_return_NAN; The ISNAN macro is defined with these lines /* If isnan is a macro, as C99 specifies, the C++ math header will undefine it. This happens on macOS */ int R_isnancpp(double); /* in mlutils.c */ Looking at the gcc preprocessor output, this if (ISNAN(df) || df <= 0.0) expands to if ((__builtin_isnan (Rf_df)!=0) || Rf_df <= 0.0) --
Apr 29 2023