Disabled applying 'sizeof' to bit-fields.
This commit is contained in:
parent
62a6e37487
commit
b67b8ddd38
1 changed files with 12 additions and 7 deletions
|
@ -1898,14 +1898,19 @@ void hie10 (ExprDesc* Expr)
|
||||||
CodeMark Mark;
|
CodeMark Mark;
|
||||||
GetCodePos (&Mark);
|
GetCodePos (&Mark);
|
||||||
hie10 (Expr);
|
hie10 (Expr);
|
||||||
/* If the expression is a literal string, release it, so it
|
if (ED_IsBitField (Expr)) {
|
||||||
** won't be output as data if not used elsewhere.
|
Error ("Cannot apply 'sizeof' to bit-field");
|
||||||
*/
|
Size = 0;
|
||||||
if (ED_IsLocLiteral (Expr)) {
|
} else {
|
||||||
ReleaseLiteral (Expr->LVal);
|
/* If the expression is a literal string, release it, so it
|
||||||
|
** won't be output as data if not used elsewhere.
|
||||||
|
*/
|
||||||
|
if (ED_IsLocLiteral (Expr)) {
|
||||||
|
ReleaseLiteral (Expr->LVal);
|
||||||
|
}
|
||||||
|
/* Calculate the size */
|
||||||
|
Size = CheckedSizeOf (Expr->Type);
|
||||||
}
|
}
|
||||||
/* Calculate the size */
|
|
||||||
Size = CheckedSizeOf (Expr->Type);
|
|
||||||
/* Remove any generated code */
|
/* Remove any generated code */
|
||||||
RemoveCode (&Mark);
|
RemoveCode (&Mark);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue