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 Sat, May 14, 2011 at 12:32:58AM +0200, Thomas Klausner wrote:
> On Fri, May 13, 2011 at 11:55:10PM +0200, Nicolas Joly wrote:
> > I just encountered a small problem with strtod(3) that alter errno
> > upon success, on my up-to-date -current amd64 and alpha machines. The
> > following sample code exhibit the problem :
> ...
> > Anyone else ?
> I was recently told that one shouldn't check errno if the call was
> successful, because some called library function might have set it to
> a value that's irrelevant, since the call you did was successful.

Right for the general case, but the OpenGroup online description
states otherwise for strtod(3) :

  "The strtod() function shall not change the setting of errno if


Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.

Home | Main Index | Thread Index | Old Index