Hi,

On Wed, Jan 19, 2022 at 7:41 PM Martin Storsjö <[email protected]> wrote:
>
> Hi Matthew,
>
> On Wed, 19 Jan 2022, Matthew Brett wrote:
>
> > We've run into a problem over at 
> > https://github.com/rgommers/scipy/issues/118
> >
> > The essence of the problem is that the *compiler* warns when we use
> > the '%zd' format code to 'printf', even though the UCRT run-time does,
> > in fact, support this code.
>
> I think this is a case of
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95130 (and
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92292).
>
> I think https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588341.html
> contains the most up to date patch to fix this issue (it's plausible it
> gets included in GCC 13.x, but if it applies on older versions too, it
> should hopefully help there too).

Thank you - that's very helpful.  Is there anything us interested
parties can do to help?

> > The compiler (correctly) *does not* warn for the `%lld` code,
> > presumably because of the guards at
> > https://github.com/mirror/mingw-w64/blob/master/mingw-w64-headers/crt/inttypes.h#L33
> > .  However, there are no such guards for the `%zd` flag, hence the
> > spurious warning.
>
> No, those don't affect anything here; those macros aren't used here. It's
> all about how the compiler interprets the format attributes on the printf
> function declarations, see the bug references above.

Thanks for the correction - you've rightly detected that I was out of
my depth trying to diagnose the problem!  And the bugs you've pointed
to explain it well.

Cheers,

Matthew


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

Reply via email to