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 04:26:12 +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 04:00 AM, Eric Blake wrote:
On 06/18/2012 07:27 PM, John Spencer wrote:

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.
That argues that printf() should be robust to _everything_ you throw at
it, even bit patterns that are not produced by arithmetic.


neither me nor paul were talking about printf().
and apparently the standard differs from your interpretation.
those bit patterns are UB and therefore can be left unhandled.

remember: gnulib checks for "POSIX compliant printf", then produces said UB and declares a perfectly conformant implementation broken.

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.
You don't need 2 different printf implementations, just one that
robustly handles all possible input.

no, i don't need that. if the guys that wrote the C99 spec were fine with UB, i'm fine with it as well.

who uses LD80 values in files anyway ?
Who cares?  POSIX requires od to support it, and that should be enough
for libc to support it.

if POSIX requires od to support it, od should handle it.
where did you get the impression that the libc should do this for you ?
that's completely bogus.





reply via email to

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