[Issue 23027] New: ImportC: Array of struct is “not a static and cannot have static initializer"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 17 06:28:32 UTC 2022
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 at puremagic.com
Reporter: dave287091 at 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;
}
--
More information about the Digitalmars-d-bugs
mailing list