Web lists-archives.com

Re: [Mingw-users] bizarre problem, need help from a mingw developer

Hash: SHA1

On 10/03/16 06:32, Eli Zaretskii wrote:
>> From: Keith Marshall <keithmarshall@xxxxxxxxxxxxxxxxxxxxx> Date:
>> Wed, 9 Mar 2016 23:11:09 +0000
>>> According to the C and C++ language standards that is wrong and
>>> has been for 15 years or so.  Don't modern Microsoft
>>> development environments now use "%lf" in compliance with the
>>> C/C++ language standards?
>> AFAIK, no they do not.  You can read it just as easily as I can,
>> but MSDN still says that "%lf" refers to a long double, just as
>> "%Lf" does; however, for users MSVC users, that's mostly
>> irrelevant, because their compiler doesn't implement long doubles
>> in any way which is distinct from plain old double.
> I think it's also irrelevant for MinGW users, since the
> documentation you get on MSDN by default refers to the latest
> versions of their runtime libraries (those msvcrNN.dll) which are
> only distributed with Visual Studio.

Maybe so, but it's the best we've got.

> MinGW, by contrast, uses the msvcrt.dll which comes with the OS, so
> you must look up the relevant printf documentation under the "Other
> versions" link provided at the top of the page.  I think the
> system-provided msvcrt.dll corresponds to VS 2003

That's the .NET reference version, which I've never considered to be a
reliable reference source for MinGW; most pertinent, particularly for
legacy users, would be the VC6 reference, but unfortunately, Microsoft
no longer provide a navigable path to it.  In any case, the MSVCRT.DLL
on Vista and later already incorporates, at least partially, support
printf() features from MSVCR80.DLL, which is a later release than is
covered by that VS 2003 reference, so no, it is not universally true
to say that the system-provided MSVCRT.DLL corresponds to VS 2003.

> or something, and there %lf is not mentioned at all.

Indeed, it isn't, but neither is there any reference to formatting of
long doubles at all, nor any hint that ANY modifier may be legally
used with "%f".  If you're going to pick that particular nit, then
"%lf" must be declared invalid usage; end of story.

In any case, when I elected to make "%lf" represent an alias for
"%Lf", in __mingw_printf(), I would (most likely) have been reading
the VC6 documentation, and based the decision on what I read there.
It's all irrelevant anyway: it is what it is, and I've already stated
(three times now) how it will change in the next mingwrt release.
Unless you want me to reconsider that forthcoming change, further
discussion seems kind of futile.

- -- 

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
Version: GnuPG v2.0.20 (GNU/Linux)


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe