[Bug math/34319] fromfp(INFINITY, ...) not NAN
"adhemerval.zanella at linaro dot org via Glibc-bugs" <[email protected]> Thu, 25 Jun 2026 12:07:51 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34319
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The fromfp before 2.43 followed the TS 18661-1 signature that returned intmax_t
and that's why you are seeing this value:
$ gcc -Wall bz34319.c -o bz34319 -std=c2x -lm
bz34319.c:7: warning: ignoring ‘#pragma STDC FENV_ACCESS’ [-Wunknown-pragmas]
7 | #pragma STDC FENV_ACCESS ON
|
$ objdump -t bz34319 | grep fromfp
0000000000000000 F *UND* 0000000000000000 fromfp@GLIBC_2.25
It binds to the old/compat implementation. If you build against a new glibc,
it works as expected:
$ x86_64-glibc-linux-gnu-gcc -Wall bz34319.c -o bz34319 -std=c23 -lm
bz34319.c:7: warning: ignoring ‘#pragma STDC FENV_ACCESS’ [-Wunknown-pragmas]
7 | #pragma STDC FENV_ACCESS ON
$ objdump -t bz34319 | grep fromfp
0000000000000000 F *UND* 0000000000000000 fromfp@GLIBC_2.43
$ elf/ld.so --library-path .:math ./bz34319
-nan
*** This bug has been marked as a duplicate of bug 28327 ***
--
You are receiving this mail because:
You are on the CC list for the bug.