[Issue 20759] New: Invalid printf checks for long double on win64
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 22 12:23:28 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20759
Issue ID: 20759
Summary: Invalid printf checks for long double on win64
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: moonlightsentinel at disroot.org
DMDs printf check does not handle C's long double properly on Win64 (which is
equivalent to D's double according to e.g.
https://docs.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=vs-2015)
===========================================
import core.stdc.config : c_long_double;
import core.stdc.stdio : printf;
void main()
{
// c_long_double is double on win64
printf("%Lg", c_long_double.init); // Invalid deprecation
printf("%Lg", real.init); // Silently accepted
}
===========================================
dmd -m64 printf.d
printf.d(7): Deprecation: argument nan for format specification "%Lg" must be
real, not double
--
More information about the Digitalmars-d-bugs
mailing list