Re: strtod error handling

2009-01-24 Thread Bruno Haible
Eric Blake wrote: > > No, other reasons are allowed as well. > > Finish reading that paragraph: > > "...if and only if all those error conditions can always be treated > identically to the error conditions as described in this volume of > POSIX.1-2008. This is a chewing-gum sentence: "can always

Re: strtod error handling

2009-01-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 1/24/2009 6:34 AM: > >>> + - In case of other error, return 0 and set errno, for example to EINVAL >>> + or ENOMEM. */ >> I think that POSIX is explicit that the only way to fail strtod() with >> EINVAL is if nothin

Re: strtod error handling

2009-01-24 Thread Bruno Haible
Eric Blake wrote: > > + - If the string does not start with a number at all, return 0 (and > > recall > > + that if ENDPTR != NULL, *ENDPTR is set to NPTR). > POSIX allows (but not requires) strtod() to set errno to EINVAL in this > case. Now for the question: is it useful to the client to