------- Comment #5 from mmitchel at gcc dot gnu dot org 2006-04-19 17:11 ------- In C++ the type of the FIELD_DECL should be "unsigned int", not "4-bit unsigned int". So, this is the usual problem that we don't quite know how "lowered" the representation shared across the front-end and back-end should be.
What I would prefer to do is to fix the C++ front-end so that "x.a = y" becomes "x.a = y & 0xf". Would that work for the back-end, or will it still be confused by the fact that we have bit-field with a type whose precision is greater than that of the field? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26534