------- Additional Comments From steven at gcc dot gnu dot org 2005-01-26 01:55 ------- Why do we cast "v" to "unsigned char" before casting to the bitfield type? This is already in the GIMPLE dump and comes from the front end: ;; Function store (store) store (bD.1118, vD.1119) { unsigned charD.10 D.1122; <unnamed type> D.1123; D.1122 = (unsigned charD.10) vD.1119; D.1123 = (<unnamed type>) D.1122; bD.1118->bD.1117 = D.1123; } Breakpoint 4, build_modify_expr (lhs=0x2a95895910, modifycode=NOP_EXPR, rhs=0x2a95988d00) at c-typeck.c:3321 3321 newrhs = convert_for_assignment (lhstype, newrhs, ic_assign, (gdb) p debug_generic_expr (newrhs) vD.1450 $13 = void (gdb) next 3323 if (TREE_CODE (newrhs) == ERROR_MARK) (gdb) p debug_generic_expr (newrhs) (<unnamed type>) (unsigned charD.10) vD.1450 $14 = void (gdb)
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18008