On 2020-01-08 09:58, Vincent Torri wrote:
the look at the official doc :
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtof-strtof-l-wcstof-wcstof-l?view=vs-2019

as strtof is a function in msvcrt.dll, maybe it's a bug in the implementation.

Stranger and stranger.  It fails when compiled this way:

   gcc -Wall -std=c99 -pedantic -o errno_prob errno_prob.c

However, it works when compiled this way:

   g++ -Wall -o errno_prob errno_prob.c

The binary is still linked to msvcrt.dll (according to ntdll) but perhaps in this mode
it calls its own function?

Searched around until the stdlib.h file was located and found within it that there was a define
__USE_MINGW_STRTOX.   So built like this:

gcc -Wall -std=c99 -pedantic -D__USE_MINGW_STRTOX -o errno_prob errno_prob.c

and strtof's errno works in both mingw32 (W7) and mingw64 (W10).

However, beyond the defines in stdlib.h I have not found any documentation about this. Could one of the developers please chip in and tell us what is going on here?
gcc is 9.2.0.

Thanks,

David Mathog
mat...@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to