lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Upgrading to gcc-4.9.2


From: Greg Chicares
Subject: Re: [lmi] Upgrading to gcc-4.9.2
Date: Sun, 20 Dec 2015 18:06:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-12-20 16:53, Vadim Zeitlin wrote:
> On Sun, 20 Dec 2015 16:33:38 +0000 Greg Chicares <address@hidden> wrote:
[...]
>  Just one last question: do you actually understand how does redefining
> _get_output_format() work? Because I freely admit that I don't and it feels
> me uncomfortable to rely on something that I don't understand. And until
> reading the above, I would have been ready to swear that this would be the
> case for you too...

Here's my reasoning.

We (well, the MinGW RTL extension library) are replacing the "*printf"
facility provided by msvcrt. IIRC, the replacement delegates to msvcrt
in cases that were already mostly correct and don't need a complete
replacement--but that delegation means that _get_output_format() affects
the output in a way that, by default, contradicts the language standard;
therefore, we replace it, too. (It would have been better IMO if mingw
did that itself, but it doesn't.)

Replacing _get_output_format() works the same way as replacing snprintf().
We're doing it locally in lmi, but that's really no different than doing
it in libmingwex. We want _get_output_format() to specify standard
behavior, which happens to mean returning 1 always; what could be more
natural, obvious, and perfect than implementing it as "{return 1;}" ?

And this seems to be a common, widely discussed practice that nobody has
found fault with over the years.

You must be seeing some problem to which I'm oblivious. What can it be?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]