Skip to content

Commit deebbb7

Browse files
committed
gh-153740: refine test for _Float16 (check support from libm)
1 parent 3daa7f8 commit deebbb7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

configure

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4474,12 +4474,13 @@ AC_CACHE_CHECK([for _Float16 support], [ac_cv_float16_supported],
44744474
WITH_SAVE_ENV([
44754475
CFLAGS="$CFLAGS -O0"
44764476
AC_RUN_IFELSE([AC_LANG_SOURCE([[
4477+
#include <math.h>
44774478
int main(void)
44784479
{
44794480
_Float16 val = 1.0f16;
44804481
double d = 3.14;
44814482
val = d;
4482-
return 0;
4483+
return isfinite(val) && !isinf(val) && !isnan(val);
44834484
}
44844485
]])], [ac_cv_float16_supported=yes],
44854486
[ac_cv_float16_supported=no],

0 commit comments

Comments
 (0)