strange behavior from SUN strtod()

Guy Harris guy at gorodish.Sun.COM
Fri Jul 22 04:46:16 AEST 1988


> >I seemed to have discovered a bug in the SUN library function strtod().`
> >Can anyone confirm this?  Here is a sample program:
>   [deleted]
> >The problem w/ the Sun strtod() lies in that the second parameter is not
> >correctly passed back.

The answer is "yes, he's found a bug in the AT&T System V Release 2.0 library
function 'strtod()'" (the Sun one is just the S5R2 one, with one #ifdef changed
to correctly specify which machines are IEEE machines).  You'll find this bug
on machines other than Suns....

> Yes, I've had the same problem.  Ended up moving the pointer by hand (humph).
> We're running Sun UNIX 4.2 Release 3.3; don't know about later versions.

AT&T's bug is fixed in S5R3, I think, or perhaps sooner.  Sun's bug is fixed in
4.0; the two implementations are now different.



More information about the Comp.lang.c mailing list