bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isnanl, printf, and non-IEEE values


From: John Spencer
Subject: Re: isnanl, printf, and non-IEEE values
Date: Tue, 19 Jun 2012 03:27:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0

On 06/19/2012 01:15 AM, Paul Eggert wrote:
On 06/18/2012 05:07 AM, John Spencer wrote:
it was already discussed that "GNU od" does,
but it can be easily fixed there.
I don't see how.
easy: add a check for the invalid LD bit representations in ldtoastr() in gnulibs ftoastr.c.
since it was written by you, this shouldn't be a problem.
(this is the code od uses to handle the long double).
And even if it could be, why not
just leave things as they are?
because you're forcing your printf replacement on implementations that don't handle invalid long double representations via the gnulib tests just to have this one odd cornercase handled. fix the one cornercase, and let the libc in question decide for itself if it wants to handle this UB.
this test needs to go away.
It's nice to be
able to print a floating point value retrieved from a file,
even if the file got messed up somehow,
ack.
and to have that
work reliably.  I'm willing to have my programs be
0.00....01% slower if I can get that extra reliability.

maybe you, but not me.
and i definitely don't want 2 different printf implementations in my binary because of this silly cornercase.
who uses LD80 values in files anyway ?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]