Bug in Cygwin strtod()

Christian Bruel christian.bruel@st.com
Mon Jan 7 10:27:00 GMT 2013


Hello,

Here is a less intrusive patch to fix the earlier issues on small
DBL_DIG targets. I added a testsuite file to track the values that
caused errors. Including original SH4 -m4-single-only failures and the
recent regression with the M_LN10 rounding.

The rounding code seems to assume that DBL_DIG is bigger than 9 when
reading the dval value. So I fixed the setting of dval so at the 9
digits are read (if less digits than 9 this is fine). This fixes the
problem, even if it's still possible that a fix in the rounding code
exists, but there are so many configuration settings that this looks
quite fragile to touch.

The problem seems to impact 32bit real targets, which are from the GCC
machine descriptions sh, rx, avr, rl78 and h8300.

Cheers

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strtod.patch
Type: text/x-patch
Size: 1888 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20130107/58583e33/attachment.bin>


More information about the Newlib mailing list