On Thu, Aug 11, 2016 at 1:30 PM, Gert Doering <[email protected]> wrote:
> sorry for being a bit lazy in answering. This is the sort of threads
> that lead to endless wars ... :-)
>
Oh, no, this one is not worth even a fist fight, forget wars :)
>
> On Sun, Aug 07, 2016 at 10:47:16AM -0400, Selva Nair wrote:
> > > I looked into this a bit, and it should indeed fix the printing of %zu
> > > on Windows. I would prefer to teach autotools to include this flag on
> > > Windows builds, instead of the suggested casts in the code. (But if
> > > you both prefer the casts, just ignore my rambling.)
> >
> > I don't like casts and agree with Steffan. That is, assuming MSVC support
> > is only for developers, we need not worry about the runtime and could
> > require MSVC 2015. I suppose we only distribute mingw cross-compiled
> > binaries.
> >
> > I think, with __USE_MINGW_ANSI_STDIO=1 mingw will use a custom
> > implementation I/O routines, so the binary size may increase a bit (by
> ~50
> > kB or ~5% in my tests).
> >
> > Also we currently use MS-specific format specs like %I64u %I64x for
> > counter_format and ptr_format. Those will have to be changed once the
> above
> > define is in place. Its only a couple of instances, though.
>
> Mmmh. Trading off 3 ("easy") casts vs. 50 kB extra code for stdio instead
> of using the platform-provided stdio library *plus* having to change
> (and possibly review) quite a few other parts of the code sounds like
> a fairly easy trade-off to me - and my conclusion would be "drop %zu,
> just cast to (unsigned int)".
>
>
So, in hindsight, that "full disclosure" about 50kB + some lines was not in
the best interests
of the case I was trying to make. Anyway... :)
> > I am looking at this as an opportunity to stop coding for VS2011 and 2013
> > and feel liberated :) If Gert is fine with this I'll make a new patch.
>
> This is somewhat tangential from not using %zu :) - I think regarding
> "which VS versions do we support", we should at least check with James
> and Lev, as these two seem to be the last ones to (regularily) build
> with MSVC...
>
I'll submit a new patch.
Selva