tccgen: initial the last member of union

This commit is contained in:
yuanbin 2010-06-11 21:18:05 +08:00
parent 6709933d78
commit dd72577759

View File

@ -4864,7 +4864,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
/* Coo: initial last member of union */ /* Coo: initial last member of union */
while (f->next && f->next->c==f->c) { while (f->next && f->next->c==f->c) {
if ((f->type.t&VT_BITFIELD) && (f->next->type.t&VT_BITFIELD) if ((f->type.t&VT_BITFIELD) && (f->next->type.t&VT_BITFIELD)
&& ((f->type.t>>VT_STRUCT_SHIFT)&0x3f)==((f->next->type.t>>VT_STRUCT_SHIFT)&0x3f)) && ((f->type.t>>VT_STRUCT_SHIFT)&0x3f)!=((f->next->type.t>>VT_STRUCT_SHIFT)&0x3f))
break; break;
f = f->next; f = f->next;
} }