digitalmars.D.bugs - =?UTF-8?B?W0lzc3VlIDIzMDI3XSBOZXc6IEltcG9ydEM6IEFycmF5IG9mIHN0?=
- d-bugmail puremagic.com (25/25) Apr 16 2022 https://issues.dlang.org/show_bug.cgi?id=23027
https://issues.dlang.org/show_bug.cgi?id=23027 Issue ID: 23027 Summary: ImportC: Array of struct is “not a static and cannot have static initializer" Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Keywords: ImportC, rejects-valid Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: dave287091 gmail.com The following C code fails to compile: struct S { int x; }; int main(){ struct S s[8] = {0}; // Error: variable `test.main.s` is not a static and cannot have static initializer return 0; } --
Apr 16 2022