Bug 22973 – importC: sizeof with array and pointer access gives array type has incomplete element type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-02T20:58:31Z
Last change time
2022-09-26T02:35:38Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2022-04-02T20:58:31Z
int *ps[1]; _Static_assert(sizeof(ps[0][0]) == sizeof(int), ""); Error: array type has incomplete element type `ps[0]`
Comment #1 by dlang-bot — 2022-09-23T09:25:30Z
@WalterBright created dlang/dmd pull request #14474 "fix Issue 22973 - importC: sizeof with array and pointer access gives…" fixing this issue: - fix Issue 22973 - importC: sizeof with array and pointer access gives array type has incomplete element type https://github.com/dlang/dmd/pull/14474
Comment #2 by dlang-bot — 2022-09-26T02:35:38Z
dlang/dmd pull request #14474 "fix Issue 22973 - importC: sizeof with array and pointer access gives…" was merged into master: - f3aceb3c765f631f51fc0b73632e7a5612b7ec51 by Walter Bright: fix Issue 22973 - importC: sizeof with array and pointer access gives array type has incomplete element type https://github.com/dlang/dmd/pull/14474