New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanf "%F" or "%H" and float_of_string are broken for "nan" on Windows #7069
Comments
Comment author: @dra27 Note that on mingw64, float_of_string works without any patching (but scanf "%F" does not) - this means it works on the old MSVCRT that mingw64 compiles against, but it's then been broken in more recent versions! |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 7069
Reporter: @gasche
Status: acknowledged (set by @damiendoligez on 2016-02-03T15:14:50Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.03.0+dev / +beta1
Category: standard library
Related to: #4688
Monitored by: braibant @diml @dra27
Bug description
I had to disable my Printf->Scanf round-tripping test for %H on nan values on Windows, because it breaks on MSVC.
1bc5c74
In #4688 we decided to fix Printf / string_of_float's handling of nan and infinite values by the MSVC runtime. I think it would be good to extend this sanitization principle to Scanf / float_of_string, to give reliable guarantees on the behavior of %F and the new %H format across platforms.
The text was updated successfully, but these errors were encountered: