https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95130

--- Comment #25 from Martin Storsjö <martin at martin dot st> ---
(In reply to Andrew Pinski from comment #23)
> Note since MSVC 2015 runtime, printf has support %ll so ms_printf should be
> fixed to incldue that.
> 
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-
> syntax-printf-and-wprintf-functions?view=msvc-140
> 
> I think for GCC 15, we should just update ms_printf to the 2015 version of
> what is supported ...

As long as GCC links against msvcrt.dll, distributed with the OS, the time
since it's supported in MSVC doesn't affect things much though.

But as Liu Hao noted, we already do support %lld in ms_printf since
c51f1e7427e6a5ae2a6d82b5a790df77a3adc99a, since it apparently was supported in
the OS provided msvcrt.dll since a number of versions anyway.

(In reply to LIU Hao from comment #24)
> `%L` (for floating-point specifiers) is not compatible between `ms_printf`
> and `gnu_printf`.

We do use gnu_printf for the UCRT printf functions (which is what MSVC ships
since 2015) though, see e.g.
https://github.com/mingw-w64/mingw-w64/commit/8565cdb729b96f1122b1e9c490a7baba7b788f18.

But since the change in c51f1e7427e6a5ae2a6d82b5a790df77a3adc99a (released in
GCC 12 already), we probably don't need this any longer. So I think it might be
more correct to revert to ms_printf for UCRT, at least for GCC >= 12 - what do
you think?

Reply via email to