This patch improves bitfield handling, but the following still fails: int main(){ struct { int x:31; // long long int x:63; char y: 2; } s; s.y = 1; return s.y != 1; } --- a/tccgen.c +++ b/tccgen.c @@ -4811,6 +4811,11 @@ ST_FUNC void unary(void) gen_op('+'); /* change type to field type, and set to lvalue */ vtop->type = s->type; + if (vtop->type.t & VT_BITFIELD) { + int dbt = vtop->type.t & VT_BTYPE; + if(dbt==VT_BOOL || dbt==VT_BYTE || dbt==VT_SHORT) + vtop->type.t = (vtop->type.t & ~VT_BTYPE) | VT_INT; + } vtop->type.t |= qualifiers; /* an array is never an lvalue */ if (!(vtop->type.t & VT_ARRAY)) {