------- Comment #6 from mmitchel at gcc dot gnu dot org 2006-04-23 03:16 ------- Generating the explicit masking operations in the front end seems to be safe, but suboptimal. The middle-end will not optimize code like:
struct A {int i : 3; }; struct A a; int f() { return a.i > 3; } // Always false unless the type of the expression "a.i" has the correct precision. When compiled as C code, this function is optimized appropriately, because the C front-end uses limited-precision types to represent bitfields. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26534