http://d.puremagic.com/issues/show_bug.cgi?id=5942
Summary: Bitfields are overwritten erroneously Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: samu...@voliacable.com --- Comment #0 from Max Samukha <samu...@voliacable.com> 2011-05-07 04:03:20 PDT --- struct S { mixin(bitfields!( int, "a" , 32, int, "b" , 32 )); } void main() { S data; data.b = 42; data.a = 1; assert(data.b == 42); // fail } Looks like assigning fields at offsets < 32 bit clears fields at offsets >= 32 bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------