← Back to index
|
Original Bugzilla link
Bug 24266 – ImportC: struct initializer entry gets ignored
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-11-29T14:52:40Z
Last change time
2023-12-08T06:52:50Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Dennis
Comments
Comment #0
by dkorpel — 2023-11-29T14:52:40Z
```C struct S { int context[4]; int id; }; int main() { struct S tn = (struct S) {{0}, 4}; __check(tn.id == 4); return 0; } ``` The assert fails. Using -vcg-ast shows dmd completely ignores the '4': ```D S tn = S([0, 0, 0, 0], ); ```
Comment #1
by dkorpel — 2023-12-07T09:50:17Z
Introduced by:
https://github.com/dlang/dmd/pull/15858
Comment #2
by dlang-bot — 2023-12-07T21:35:47Z
@WalterBright created dlang/dmd pull request #15891 "fix Issue 24266 - ImportC: struct initializer entry gets ignored" fixing this issue: - fix Issue 24266 - ImportC: struct initializer entry gets ignored
https://github.com/dlang/dmd/pull/15891
Comment #3
by dlang-bot — 2023-12-08T06:52:50Z
dlang/dmd pull request #15891 "fix Issue 24266 - ImportC: struct initializer entry gets ignored" was merged into master: - 376a986accbdf2546f5999b09fb2606080a90391 by Walter Bright: fix Issue 24266 - ImportC: struct initializer entry gets ignored
https://github.com/dlang/dmd/pull/15891