[Issue 20759] Invalid printf checks for long double on win64
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 22 14:26:09 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20759
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #1 from kinke <kinke at gmx.net> ---
This is specific to DMD and should be an issue with -m32mscoff too. As you
said, the MSVC `long double` type is a (for C++, differently mangled than
double) 64-bit double (IIRC, Microsoft outright forbids X87 usage in kernel
code), while DMD goes with 80-bit X87 reals for those targets (so printf and
scanf etc. from the MS runtime cannot be used without converting to lower
precision first). LDC uses 64-bit reals for MSVC targets, so this works.
The deprecation wrt. double is IMO valid, as `%Lg` with a double isn't portable
and just happens to work for targets with 64-bit reals, but this deprecation
should IMO be host-agnostic, i.e., not suddenly popping up when targeting
AArch64 or Posix x86.
--
More information about the Digitalmars-d-bugs
mailing list