From 269e2dc4928188503ec9fd04ee00cb8405ba6446 Mon Sep 17 00:00:00 2001 From: das <das@FreeBSD.org> Date: Wed, 3 Jan 2007 21:28:26 +0000 Subject: [PATCH] Remove the test that ensures that when the string "nan(...)" is converted to floating-point, the result is a quiet NaN. The current implementation may return a signaling NaN, and the vendor has no plans for changing this, for reasons explained in the comment I added. --- tools/regression/lib/libc/stdio/test-scanfloat.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/regression/lib/libc/stdio/test-scanfloat.c b/tools/regression/lib/libc/stdio/test-scanfloat.c index 342fc734d21e..ef6faaebfe00 100644 --- a/tools/regression/lib/libc/stdio/test-scanfloat.c +++ b/tools/regression/lib/libc/stdio/test-scanfloat.c @@ -190,7 +190,15 @@ main(int argc, char *argv[]) assert(f != f); assert(d != d); assert(ld != ld); +#if 0 + /* + * POSIX says we should only generate quiet NaNs, but the gdtoa + * author convincingly argues that if you ask for a NaN format + * based on some implementation-defined string, you should get + * what you asked for, even if it's a signaling NaN. + */ assert(fetestexcept(FE_INVALID) == 0); +#endif printf("ok 2 - scanfloat\n");