Bug 22610 – ImportC: 3 extra initializer(s) for struct __tag21

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-12-19T16:13:29Z
Last change time
2022-09-15T09:53:27Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Lance Bachmeier
See also
https://issues.dlang.org/show_bug.cgi?id=23217

Comments

Comment #0 by lance — 2021-12-19T16:13:29Z
C code: typedef struct { unsigned char c[4]; } stb_easy_font_color; stb_easy_font_color c = { 255,255,255,255 }; // use structure copying to avoid needing depending on memcpy() DMD returns: Error: 3 extra initializer(s) for `struct __tag21` This can be manually fixed with explicit nesting: stb_easy_font_color c = { { 255,255,255,255 } }; Forum thread: https://forum.dlang.org/post/[email protected]
Comment #1 by lance — 2021-12-19T16:20:55Z
Comment #2 by dlang-bot — 2022-09-15T07:43:34Z
@WalterBright created dlang/dmd pull request #14437 "fix Issue 22610 - ImportC: 3 extra initializer(s) for struct __tag21" fixing this issue: - fix Issue 22610 - ImportC: 3 extra initializer(s) for struct __tag21 https://github.com/dlang/dmd/pull/14437
Comment #3 by dlang-bot — 2022-09-15T09:53:27Z
dlang/dmd pull request #14437 "fix Issue 22610 - ImportC: 3 extra initializer(s) for struct __tag21" was merged into master: - 15d3270a7064764d97caae504c1cbd1ea7f06622 by Walter Bright: fix Issue 22610 - ImportC: 3 extra initializer(s) for struct __tag21 https://github.com/dlang/dmd/pull/14437