diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2020-12-15 16:06:48 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2020-12-24 06:05:46 +0530 |
commit | 41290b6e842a2adfbda77a49abfacb0db2d63bfb (patch) | |
tree | 512b1a4fcb9e1c2fd47591008d076ba62c3311e9 /sysdeps/x86/tst-ldbl-nonnormal-printf.c | |
parent | 94547d9209db483c17285599a0c22085067361f0 (diff) | |
download | glibc-41290b6e842a2adfbda77a49abfacb0db2d63bfb.tar.gz glibc-41290b6e842a2adfbda77a49abfacb0db2d63bfb.tar.xz glibc-41290b6e842a2adfbda77a49abfacb0db2d63bfb.zip |
Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61
Do not attempt to fix the significand top bit in long double input received in printf. The code should never reach here because isnan should now detect unnormals as NaN. This is already a NOP for glibc since it uses the gcc __builtin_isnan, which detects unnormals as NaN. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/x86/tst-ldbl-nonnormal-printf.c')
-rw-r--r-- | sysdeps/x86/tst-ldbl-nonnormal-printf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sysdeps/x86/tst-ldbl-nonnormal-printf.c b/sysdeps/x86/tst-ldbl-nonnormal-printf.c index 54381ece0b..2b513960a7 100644 --- a/sysdeps/x86/tst-ldbl-nonnormal-printf.c +++ b/sysdeps/x86/tst-ldbl-nonnormal-printf.c @@ -42,10 +42,7 @@ do_test (void) char buf[30]; int ret = snprintf (buf, sizeof (buf), "%Lg", value); TEST_COMPARE (ret, strlen (buf)); - if (strcmp (buf, "nan") != 0) - /* If snprintf does not recognize the non-normal number as a NaN, - it has added the missing explicit MSB. */ - TEST_COMPARE_STRING (buf, "3.02201e-4624"); + TEST_COMPARE_STRING (buf, "nan"); return 0; } |