[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strtod.c compilation failure on i386/Solaris 10
From: |
Eric Blake |
Subject: |
Re: strtod.c compilation failure on i386/Solaris 10 |
Date: |
Sat, 12 Apr 2008 06:47: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 Jim Meyering on 4/12/2008 6:40 AM:
| Thanks for the quick reply (yes, I owe you at least one ;-).
|
| These are from gcc, so I looked in gcc's own extend.texi
| and saw that they are functions. Here are examples that compile:
|
| double d = __builtin_huge_val();
| double e = __builtin_nan("0x0");
Aha. Solaris 10 has a buggy math.h - it defines NAN and HUGE_VAL
incorrectly (to the value of the builtin function address, and not the
result of calling the function), which totally explains the compiler error
message. Actually, __builtin_nan(NULL) and __builtin_nan("") should
compile as well; __builtin_nan() maps to POSIX nan() (not yet provided by
gnulib), which POSIX specifies behaves as:
nan(NULL) => strtod("NAN",NULL)
nan("") => strtod("NAN()",NULL)
nan("0x0") => strtod("NAN(0x0)",NULL)
Now that we know the problem, I'll try and start hacking together a
math.in.h fix.
- --
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
iEYEARECAAYFAkgAr3MACgkQ84KuGfSFAYBA2QCgoA+wyTQHtjhajKpZruHoMmGB
nh0AoMuEXikqHg/snoB/nCd4i9KCQxwH
=tVLu
-----END PGP SIGNATURE-----
- strtod.c compilation failure on i386/Solaris 10, Jim Meyering, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Simon Josefsson, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Eric Blake, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Jim Meyering, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10,
Eric Blake <=
- Re: strtod.c compilation failure on i386/Solaris 10, Eric Blake, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Jim Meyering, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Jim Meyering, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Bruno Haible, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Jim Meyering, 2008/04/12
- Re: strtod.c compilation failure on i386/Solaris 10, Eric Blake, 2008/04/12