Current-Users archive

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

Re: strtod(3) sets errno upon success ?



On Fri, 13 May 2011, Nicolas Joly wrote:

#include <assert.h>
#include <errno.h>
#include <stdlib.h>

int main() {
 const char *str;
 double d;

 str = "1.0"; errno = 0;
 d = strtod(str, NULL);
 assert(d == 1.0);
 assert(errno == 0);

 return 0; }

Anyone else ?

Yes, same thing on my amd64 5.99.51 built from sources checked out on 2011-05-08 at 14:01:18 UTC


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index