etype = getSpec (type);
SPEC_SCLS (etype) = (SPEC_SCLS (petype) == S_REGISTER ?
SPEC_SCLS (etype) : SPEC_SCLS (petype));
+ SPEC_OCLS (etype) = (SPEC_SCLS (petype) == S_REGISTER ?
+ SPEC_OCLS (etype) : SPEC_OCLS (petype));
if (IS_SPEC (type))
SPEC_CONST (type) |= SPEC_CONST (stype);
else
if (!loop->etype->select.s.b_signed)
SPEC_USIGN(loop->etype) = 1;
- SPEC_BLEN (loop->etype) = loop->bitVar;
-
if (loop->bitVar == BITVAR_PAD) {
/* A zero length bitfield forces padding */
- SPEC_BSTR (loop->etype) = bitOffset;
SPEC_BLEN (loop->etype) = 0;
- bitOffset = 8;
+ SPEC_BSTR (loop->etype) = bitOffset;
+ if (bitOffset > 0)
+ bitOffset = 8; /* padding is not needed when at bit 0 */
loop->offset = sum;
}
else {
+ SPEC_BLEN (loop->etype) = loop->bitVar;
+
if (bitOffset == 8) {
bitOffset = 0;
sum++;
int res;
if (IS_VOID (src->next) && IS_VOID (dest->next))
- return 1;
+ return bMustCast ? -1 : 1;
if ((IS_VOID (src->next) && !IS_VOID (dest->next)) ||
(!IS_VOID (src->next) && IS_VOID (dest->next)) )
return -1;