NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/45020: strtold(3) does not detect NaN
The following reply was made to PR lib/45020; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, lib-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc:
Subject: Re: lib/45020: strtold(3) does not detect NaN
Date: Sat, 4 Jun 2011 06:51:46 -0400
On Jun 4, 9:55am, jruohonen%iki.fi@localhost (Jukka Ruohonen) wrote:
-- Subject: lib/45020: strtold(3) does not detect NaN
| >Description:
|
| The saga of strtod(3) bugs continues: the long double variant does not
| detect NaN on amd64.
|
| >How-To-Repeat:
|
| ...
|
| long double ld;
|
| ld = strtold("NaN", NULL);
|
| if (isnan(ld) == 0)
| printf("fail");
|
| ...
Looks like a compiler bug to me. Either use -ffloat-store, or call isnanl()
directly.
christos
Home |
Main Index |
Thread Index |
Old Index