April 17, 2022 [Issue 23027] New: ImportC: Array of struct is “not a static and cannot have static initializer" | ||||
|---|---|---|---|---|
| ||||
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; } -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply