This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix strtod for small DBL_DIG


Hello,

This fixes a Plummhall ch7_1961B test failure discovered on SH4 GCC for -m4-single-only mode (doubles as 32 bit floats) on sscanf.

It is better illustrated with the attached reduced test case. The problem turned out to be the digit counts in _strtod_ that are incremented to much beyond DBL_DIG.

The attached patch fixes this problem by updating the counts after the DBL_DIG checks.

Best Regards.

Christian




Attachment: newlib.patch
Description: Text document

Attachment: fl.c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]