Bug 22893 – importC: can't cast array to integral type

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-18T04:33:04Z
Last change time
2022-03-19T07:37:33Z
Keywords
ImportC, rejects-valid
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2022-03-18T04:33:04Z
char buf[1]; void fn() { unsigned long p = (unsigned long)buf; } Error: cannot cast expression `buf` of type `char[1]` to `ulong` (it should turn into the pointer)
Comment #1 by bugzilla — 2022-03-19T07:37:33Z
*** This issue has been marked as a duplicate of issue 22884 ***