Bug 22375 – importC: Error: C non-array initializer not supported yet

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-10T08:04:17Z
Last change time
2021-10-13T13:17:34Z
Keywords
diagnostic, ImportC, pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-10-10T08:04:17Z
Seems like a case of wrong error, because it is an array --- typedef struct SS { unsigned short a, b, c, d; } S; static const S array[10] = { {0, 0, 0, 0}, {4, 4, 8, 4}, {4, 5, 16, 8}, {4, 6, 32, 32}, {4, 4, 16, 16}, {8, 16, 32, 32}, {8, 16, 128, 128}, {8, 32, 128, 256}, {32, 128, 258, 1024}, {32, 258, 258, 4096} }; --- Error: C non-array initializer (const(ushort)) {0, 0, 0, 0} not supported yet Error: C non-array initializer (const(ushort)) {4, 4, 8, 4} not supported yet Error: C non-array initializer (const(ushort)) {4, 5, 16, 8} not supported yet Error: C non-array initializer (const(ushort)) {4, 6, 32, 32} not supported yet Error: C non-array initializer (const(ushort)) {4, 4, 16, 16} not supported yet Error: C non-array initializer (const(ushort)) {8, 16, 32, 32} not supported yet Error: C non-array initializer (const(ushort)) {8, 16, 128, 128} not supported yet Error: C non-array initializer (const(ushort)) {8, 32, 128, 256} not supported yet Error: C non-array initializer (const(ushort)) {32, 128, 258, 1024} not supported yet Error: C non-array initializer (const(ushort)) {32, 258, 258, 4096} not supported yet
Comment #1 by dlang-bot — 2021-10-10T10:57:30Z
@ibuclaw created dlang/dmd pull request #13147 "fix Issue 22375 - importC: Error: C non-array initializer not supported yet" fixing this issue: - fix Issue 22375 - importC: Error: C non-array initializer not supported yet https://github.com/dlang/dmd/pull/13147
Comment #2 by dlang-bot — 2021-10-10T12:50:42Z
dlang/dmd pull request #13147 "fix Issue 22375 - importC: Error: C non-array initializer not supported yet" was merged into stable: - b200810332ae7a45a5c1ec524bc43f57b30d1aca by Iain Buclaw: fix Issue 22375 - importC: Error: C non-array initializer not supported yet https://github.com/dlang/dmd/pull/13147
Comment #3 by dlang-bot — 2021-10-13T13:17:34Z
dlang/dmd pull request #13164 "Merge stable" was merged into master: - 64a36bbcc7dcea3900c586d8b70352313ce58dba by Iain Buclaw: fix Issue 22375 - importC: Error: C non-array initializer not supported yet https://github.com/dlang/dmd/pull/13164