Bug 22713 – ImportC: op= not correctly implemented for bit fields
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-01-30T07:59:57Z
Last change time
2022-01-30T09:36:13Z
Keywords
ImportC, pull, wrong-code
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2022-01-30T07:59:57Z
struct S
{
unsigned int a:2, b:2;
};
int test()
{
S s;
s.a = 3;
s.a = s.a + 2; // works
s.a += 2; // incorrect code generated
return s.a;
}
Comment #1 by dlang-bot — 2022-01-30T08:34:50Z
@WalterBright created dlang/dmd pull request #13587 "fix Issue 22713 - ImportC: op= not correctly implemented for bit fields" fixing this issue:
- fix Issue 22713 - ImportC: op= not correctly implemented for bit fields
https://github.com/dlang/dmd/pull/13587
Comment #2 by dlang-bot — 2022-01-30T09:36:13Z
dlang/dmd pull request #13587 "fix Issue 22713 - ImportC: op= not correctly implemented for bit fields" was merged into master:
- 5f928cc4e8d0a5c39e722f025b73e7191f7f7455 by Walter Bright:
fix Issue 22713 - ImportC: op= not correctly implemented for bit fields
https://github.com/dlang/dmd/pull/13587