result of sizeof() is 'unsigned int' (for backward compatibility)
This commit is contained in:
parent
1c38259279
commit
ed1a25aea5
@ -153,7 +153,7 @@ ch3mon(oper, expp)
|
|||||||
(arith)((*expp)->SG_LEN) :
|
(arith)((*expp)->SG_LEN) :
|
||||||
size_of_type((*expp)->ex_type,
|
size_of_type((*expp)->ex_type,
|
||||||
symbol2str((*expp)->ex_type->tp_fund))
|
symbol2str((*expp)->ex_type->tp_fund))
|
||||||
, (int_size == pointer_size ? UNSIGNED : ULONG));
|
, UNSIGNED);
|
||||||
expr->ex_flags |= EX_SIZEOF;
|
expr->ex_flags |= EX_SIZEOF;
|
||||||
free_expression(*expp);
|
free_expression(*expp);
|
||||||
*expp = expr;
|
*expp = expr;
|
||||||
|
|||||||
@ -148,8 +148,7 @@ size_of(register struct expr **expp;)
|
|||||||
[%if (first_of_type_specifier(AHEAD) && AHEAD != IDENTIFIER)
|
[%if (first_of_type_specifier(AHEAD) && AHEAD != IDENTIFIER)
|
||||||
cast(&tp)
|
cast(&tp)
|
||||||
{
|
{
|
||||||
*expp = intexpr(size_of_type(tp, "type"),
|
*expp = intexpr(size_of_type(tp, "type"), UNSIGNED);
|
||||||
(int_size == pointer_size ? UNSIGNED : ULONG));
|
|
||||||
(*expp)->ex_flags |= EX_SIZEOF;
|
(*expp)->ex_flags |= EX_SIZEOF;
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user