Bug 22362 – ImportC: error parsing compound literal with more than one value at function scope.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-06T19:29:23Z
Last change time
2021-10-13T13:17:33Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
dave287091

Comments

Comment #0 by dave287091 — 2021-10-06T19:29:23Z
// compound.c typedef struct Foo { int x, y; } Foo; Foo gfoo = (Foo){0, 1}; // no error int main(int argc, char** argv){ Foo foo1 = (Foo){0}; // no error Foo foo2 = (Foo){0, 1}; // error here } compound.c(9): Error: found `=` when expecting `;` or `=`, did you mean `Foo foo2 = (`? compound.c(9): Error: found `=` instead of statement compound.c(9): Error: identifier or `(` expected compound.c(10): Error: identifier or `(` expected
Comment #1 by dlang-bot — 2021-10-09T10:00:10Z
@WalterBright created dlang/dmd pull request #13143 "fix Issue 22362 - ImportC: error parsing compound literal with more t…" fixing this issue: - fix Issue 22362 - ImportC: error parsing compound literal with more than one value at function scope https://github.com/dlang/dmd/pull/13143
Comment #2 by dlang-bot — 2021-10-11T11:32:28Z
dlang/dmd pull request #13143 "fix Issue 22362 - ImportC: error parsing compound literal with more t…" was merged into stable: - 6f0f46e9305fb4360da8f4f54ada6803835212e6 by Walter Bright: fix Issue 22362 - ImportC: error parsing compound literal with more than one value at function scope https://github.com/dlang/dmd/pull/13143
Comment #3 by dlang-bot — 2021-10-13T13:17:33Z
dlang/dmd pull request #13164 "Merge stable" was merged into master: - 454b5263400f9e0498a18cb89fbe0c79d3798a28 by Walter Bright: fix Issue 22362 - ImportC: error parsing compound literal with more than one value at function scope (#13143) https://github.com/dlang/dmd/pull/13164