Bug 22749 – importC: C11 does not allow taking the address of a bit-field

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-02-08T16:57:01Z
Last change time
2022-02-09T09:41:49Z
Keywords
ImportC, wrong-code
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-02-08T16:57:01Z
DMD happily compiles this C11 code. --- struct bit { int v : 1; }; int main() { struct bit b; void* ptr = &b.v; } ---
Comment #1 by dlang-bot — 2022-02-08T17:35:05Z
@ibuclaw created dlang/dmd pull request #13624 "Issue 22749 - importC: C11 does not allow taking the address of a bit-field" mentioning this issue: - Issue 22749 - importC: C11 does not allow taking the address of a bit-field https://github.com/dlang/dmd/pull/13624
Comment #2 by dlang-bot — 2022-02-09T09:41:49Z
dlang/dmd pull request #13624 "fix Issue 22749 - importC: C11 does not allow taking the address of a bit-field" was merged into master: - 39e93dafe2f0602c94d23a6018f16a3a5ffffb2d by Iain Buclaw: fix Issue 22749 - importC: C11 does not allow taking the address of a bit-field https://github.com/dlang/dmd/pull/13624