RFA: strtod patch
Mark Mitchell
mark@codesourcery.com
Sun Sep 16 10:34:00 GMT 2001
--On Sunday, September 16, 2001 04:47:11 AM -0700 Per Bothner
<per@bothner.com> wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
>>> It turns out that the C strtod library function used in libjava was
>> broken. The code removed by this patch had the effect of causing
>> a 0 exponent to result in EINVAL, which does not make sense to me.
>> The patch looks wrong. The problem is not the error result code,
> but some mis-placed braces. Could you try out the following
> (which I've only verified that it compiles)?
>
Your patch has the effect of making `1.0E' result in an error, I think.
The strtod documentation I have handy does not indicate that is what
should happen. Instead, it indicates that the result should be `1.0',
and that the pointer pointed to by the second argument to strtod should
now point at `E'. Is there a reason that the version in the Java
library needs to work differently from the usual strtod function?
Thanks,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Java
mailing list