[Issue 23217] New: ImportC: extra initializer(s) error for array of structs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 29 07:35:59 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23217
Issue ID: 23217
Summary: ImportC: extra initializer(s) error for array of
structs
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The following:
typedef struct {
int a,b,c;
} code;
const code array[2] = { {96,7,0}, {0,8,80} };
const code distfix[2] = { {22,5,193}, {64,5,0} };
fails for distfix with:
test.c(8): Error: 2 extra initializer(s) for `struct __tag3`
test.c(8): Error: 2 extra initializer(s) for `struct __tag3`
It's related to the typedef and the const somehow.
--
More information about the Digitalmars-d-bugs
mailing list