bug-gnulib
[Top][All Lists]
Advanced

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

Re: strtod bugs


From: Eric Blake
Subject: Re: strtod bugs
Date: Tue, 01 Apr 2008 20:00:47 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 4/1/2008 7:45 PM:
|> Were you planning on backing out the math.in.h changes?
|
| It depends on your vote... If you say no, then no.

Let's leave it in for now: I'm brave enough to make m4 1.4.11 the litmus
test.  If someone complains that strtod.c's use of NAN as provided by
math.in.h breaks compilation of M4, we can revisit the issue and help them
find a workaround.  But my guess (or at least my hope) is that no one will
speak up.

|
| nan.h lives in tests/, since for it to be usable in lib/ one additionally
| needs to use 'inline' or similar.

OK.  Which means math.in.h can't use it.

| Also, it's too tempting to write
|
|    sprintf (buf, "%Le foobar", NAN);
|
| but then the argument being passed is actually a 'double', not a 'long
double'.
| Providing a macro NaNl() avoids this pitfall.

True enough (but no different than the bug of:

sprintf (buf, "%p", 0);

in terms of neglecting to cast a var-arg argument properly).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfy6M8ACgkQ84KuGfSFAYDX9QCgvKV8e6m+//wKFnhQ2crMYb/x
WIgAoJkI4tgbaeiH088oAQlMEbNXn9jI
=Y7nL
-----END PGP SIGNATURE-----




reply via email to

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