News for hackers. Stuff that matters.
Re:Betrayed by a bitfield (2012) by arcticbull on Sunday July 03, 2016 @03:01PM (#12027182)
This was resolved in GCC 4.8 here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52080

"Here is a candidate patch (it ICEs one Ada testcase, see PR52134). It enforces the C++11 memory model (as far as bitfields are concerned) upon everyone and builds on the machinery that was implemented for it (changing the implementation for when we compute "an underlying object" and permanently store it, to make it possible to use this information for optimization purposes)."

If I'm not mistaken they could have ensured 64-bit alignment when a bitfield immediately follows a lock, although that likely wouldn't have been fun.

There are no comments on this comment yet.