https://issues.dlang.org/show_bug.cgi?id=22918
Issue ID: 22918
Summary: importC: some types not zero-initialized in static
variables
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ImportC
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
char c;
double dbl;
enum E { a = 1, };
enum E myE;
int printf(char *, ...);
int main()
{
printf("%d\n", (int)c);
printf("%lf\n", dbl);
printf("%d\n", (int)myE);
return 0;
}
should print 0, 0.000000, 0, but prints 255, nan, 1
--