Hi,
Both strtoflt128() and strtod() correctly parse hex input strings (eq "0xdead") and assign values correctly.
However, strtold() just assigns them as zero, and dumps everything after the leading "0" into the string specified by strtold's second argument.
I'm using gcc version 7.2.0 (i686-posix-dwarf-rev1, Built by MinGW-W64 project) and gcc version 7.2.0 (x86_64-posix-seh-rev1, Built by MinGW-W64 project) - both of which, I believe, use the latest mingw runtime.
Attached is the demo (and it's output on Windows), which I built with "gcc -o try.exe try.c -lquadmath".
On Ubuntu, strtold() parses the hex string as expected, and assigns the correct value.
Cheers,
Rob
Same result with
gcc version 7.3.0 x86_64-posix-seh-rev0.It's also the same result with 8.1.0.
However, as a workaround, calling __mingw_strtold() instead of strtold() works fine on 8.1.0.
I haven't checked whether the same workaround is successful with earlier versions of gcc, but I'm hopeful that it does.
Cheers,
Rob