GMP configure checks for the availability of %n format specifier. Because of security reasons, Microsoft has disabled the %n format specifier by default. To use the %n format specifier, _set_printf_count_output(1) must be called.
--- Best regards, Yuta -----Original Message----- From: Martin Storsjö <mar...@martin.st> Sent: Tuesday, November 12, 2024 5:32 PM To: mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] Different behaviour between msvcrt and ucrt compilers wrt -D__USE_MINGW_ANSI_STDIO On Tue, 12 Nov 2024, sisyphus wrote: > (Otherwise the gmp configure step decides that vsnprintf does not > work, and an mpfr library built against the resultant gmp library > exhibits some buggy > behaviour.) The intent is that those stdio functions would be working correctly enough in general on UCRT, that's why __USE_MINGW_ANSI_STDIO isn't enabled implicitly there. (The main known issue is around long doubles, which are rare in practice.) Can you dig into why gmp thinks that vsnprintf doesn't work in this case, and why mpfr behaves buggily in that case? That's the main contructive way forward here, I think. // Martin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public