D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22893 - importC: can't cast array to integral type
Summary: importC: can't cast array to integral type
Status: RESOLVED DUPLICATE of issue 22884
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC, rejects-valid
Depends on:
Blocks:
 
Reported: 2022-03-18 04:33 UTC by duser
Modified: 2022-03-19 07:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description duser 2022-03-18 04:33:04 UTC
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 Walter Bright 2022-03-19 07:37:33 UTC

*** This issue has been marked as a duplicate of issue 22884 ***