summaryrefslogtreecommitdiff
path: root/doc/posix-functions/isnan.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-02-20 18:09:47 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-02-20 18:10:46 -0800
commitbd38edc81714fc2679b02ef34033f9e15954d32f (patch)
tree239b8fb6edeb8bac9c3bb8065cd152101ce04fd4 /doc/posix-functions/isnan.texi
parent12d27cace7a75301f793527a57e5ae09ed73c4ba (diff)
downloadgnulib-bd38edc81714fc2679b02ef34033f9e15954d32f.tar.gz
printf, isinf, etc.: noncanonical != NaN
Do not require that isinf, printf, etc. treat noncanonical values as NaNs. Instead, require only that they do not crash. Problem reported by Joseph Myers in: https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html * doc/posix-functions/dprintf.texi (dprintf): * doc/posix-functions/fprintf.texi (fprintf): * doc/posix-functions/isfinite.texi (isfinite): * doc/posix-functions/isinf.texi (isinf): * doc/posix-functions/isnan.texi (isnan): * doc/posix-functions/printf.texi (printf): * doc/posix-functions/snprintf.texi (snprintf): * doc/posix-functions/sprintf.texi (sprintf): * doc/posix-functions/vdprintf.texi (vdprintf): * doc/posix-functions/vfprintf.texi (vfprintf): * doc/posix-functions/vprintf.texi (vprintf): * doc/posix-functions/vsnprintf.texi (vsnprintf): * doc/posix-functions/vsprintf.texi (vsprintf): Document this. * m4/isfinite.m4 (gl_ISFINITEL_WORKS): * m4/isinf.m4 (gl_ISINFL_WORKS): * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): * tests/test-isfinite.c (test_isfinitel): * tests/test-isinf.c (test_isinfl): * tests/test-isnan.c (test_long_double): * tests/test-isnanl.h (main): * tests/test-snprintf-posix.h (test_function): * tests/test-sprintf-posix.h (test_function): * tests/test-vasnprintf-posix.c (test_function): * tests/test-vasprintf-posix.c (test_function): o Test only that noncanonical values do not cause crashes, not that they are treated as NaNs. In some cases this means a larger output buffer is needed.
Diffstat (limited to 'doc/posix-functions/isnan.texi')
-rw-r--r--doc/posix-functions/isnan.texi13
1 files changed, 4 insertions, 9 deletions
diff --git a/doc/posix-functions/isnan.texi b/doc/posix-functions/isnan.texi
index 160b7a4627..f9ed11a6b5 100644
--- a/doc/posix-functions/isnan.texi
+++ b/doc/posix-functions/isnan.texi
@@ -19,17 +19,12 @@ on pre-C99 systems.
IRIX 6.5, OSF/1 5.1 with gcc, Solaris 11 2011-11.
@item
On IRIX 6.5 with @code{cc}, @code{isnan} does not recognize some NaNs.
-@item
-On NetBSD/i386 and glibc/ia64, @code{isnan} does not recognize some
-forms of NaNs, such as pseudo-NaNs, pseudo-Infinities, and
-unnormalized numbers.
-@item
-On i686 and @var{x}86-64, @code{__builtin_isnanl} (and thus
-@code{isnan} implementations based on it) in GCC 4.0 and later does
-not recognize pseudo-denormals as NaNs, and similarly for
-pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
+@item
+This macro returns an unspecified result when given noncanonical values
+such as unnormalized numbers, pseudo-denormals, pseudo-NaNs,
+pseudo-Infinities, and pseudo-zeroes.
@end itemize