Bug 14718 – float parsing depends on libc strtold precision

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-21T14:34:44Z
Last change time
2024-12-13T18:43:31Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#19008 →

Comments

Comment #0 by code — 2015-06-21T14:34:44Z
On a debian-7.4 system with an older glibc version the following floating point literals cannot be parsed because the compiler uses the platform strtold to convert the number. 0x1p-1024 0x1p-128f
Comment #1 by github-bugzilla — 2015-06-21T18:18:39Z
Commits pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/eaeeccd4ac4845d07331ef6044e2050aca14b90a workaround Issue 14718 - float parsing depends on platform strtold - comment out the affected unittests for now https://github.com/D-Programming-Language/phobos/commit/53dbbaa2bc18723a0a6d67a78fe0eb517430a50a Merge pull request #3433 from MartinNowak/workaround14718 workaround Issue 14718 - float parsing depends on platform strtold
Comment #2 by andrei — 2015-06-21T21:40:23Z
Same problem on Centos 6.
Comment #3 by code — 2015-06-22T11:41:02Z
Sounds a lot like this glibc bug [14047 – strtof gives spurious ERANGE errors](https://sourceware.org/bugzilla/show_bug.cgi?id=14047) which got fixed with glibc 2.17.
Comment #4 by github-bugzilla — 2015-07-25T00:03:22Z
Comment #5 by github-bugzilla — 2017-07-19T17:43:30Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/eaeeccd4ac4845d07331ef6044e2050aca14b90a workaround Issue 14718 - float parsing depends on platform strtold https://github.com/dlang/phobos/commit/53dbbaa2bc18723a0a6d67a78fe0eb517430a50a Merge pull request #3433 from MartinNowak/workaround14718
Comment #6 by robert.schadek — 2024-12-13T18:43:31Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19008 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB