On Sun, 16 Aug 2026, Zhongteng Gui wrote:

I wonder if there's any _observable_ difference between mingw's stdio implemention and UCRT's.

Yes. The main one is that "long double" isn't printed correctly with UCRT's printf, on i386/x86_64.

There are probably a few other minor differences as well (in particular some cases for the wprintf family of functions), but the "long double" case is the main one.

It's indeed not great that printfs of long doubles don't work exactly right on UCRT, but on the other hand, use of long doubles is quite rare, and we want to ideally use as much as possible directly from UCRT rather than statically linking in our own stuff.

On arm/aarch64, "long double" is the same as it is in MSVC environments, so there, there's no problems in printing long doubles with the UCRT printf, so there, the biggest need for -D__USE_MINGW_ANSI_STDIO=1 is avoided.

If not, does it mean that __USE_MINGW_ANSI_STDIO is no longer needed to be defined on UCRT based environments (and maybe we can remove the -Wp,-D__USE_MINGW_ANSI_STDIO=1 from MSYS2's default CFLAGS for UCRT64/CLANG64/CLANGARM64)?

It might be possible to consider it for CLANGARM64, but removing it from the ones on x86 may expose issues.

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to