Disabled applying 'sizeof' to bit-fields.
This commit is contained in:
@@ -1898,6 +1898,10 @@ void hie10 (ExprDesc* Expr)
|
|||||||
CodeMark Mark;
|
CodeMark Mark;
|
||||||
GetCodePos (&Mark);
|
GetCodePos (&Mark);
|
||||||
hie10 (Expr);
|
hie10 (Expr);
|
||||||
|
if (ED_IsBitField (Expr)) {
|
||||||
|
Error ("Cannot apply 'sizeof' to bit-field");
|
||||||
|
Size = 0;
|
||||||
|
} else {
|
||||||
/* If the expression is a literal string, release it, so it
|
/* If the expression is a literal string, release it, so it
|
||||||
** won't be output as data if not used elsewhere.
|
** won't be output as data if not used elsewhere.
|
||||||
*/
|
*/
|
||||||
@@ -1906,6 +1910,7 @@ void hie10 (ExprDesc* Expr)
|
|||||||
}
|
}
|
||||||
/* Calculate the size */
|
/* Calculate the size */
|
||||||
Size = CheckedSizeOf (Expr->Type);
|
Size = CheckedSizeOf (Expr->Type);
|
||||||
|
}
|
||||||
/* Remove any generated code */
|
/* Remove any generated code */
|
||||||
RemoveCode (&Mark);
|
RemoveCode (&Mark);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user