Bug 22913 – importC: array index expression parsed as cast
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-23T10:45:34Z
Last change time
2022-03-25T11:54:29Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
duser
Comments
Comment #0 by duser — 2022-03-23T10:45:34Z
void fn()
{
int a[1];
int b = (a[0]);
}
test.c(4): Error: expression expected, not `;`
test.c(5): Error: `=`, `;` or `,` expected to end declaration instead of `}`
test.c(6): Error: found `End of File` when expecting `}` following compound statement
new regression from https://github.com/dlang/dmd/pull/13850
Comment #1 by dlang-bot — 2022-03-24T04:12:35Z
@WalterBright created dlang/dmd pull request #13880 "fix Issue 22913 - importC: array index expression parsed as cast" fixing this issue:
- fix Issue 22913 - importC: array index expression parsed as cast
https://github.com/dlang/dmd/pull/13880