We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 276b8d7 + 5f86851 commit f649c47Copy full SHA for f649c47
regression/ansi-c/sizeof4/test.desc
@@ -1,4 +1,4 @@
1
-KNOWNBUG
+CORE
2
main.c
3
4
^EXIT=0$
src/ansi-c/c_typecheck_expr.cpp
@@ -950,7 +950,14 @@ void c_typecheck_baset::typecheck_expr_sizeof(exprt &expr)
950
}
951
else
952
{
953
- type.swap(to_unary_expr(expr).op().type());
+ const exprt &op = to_unary_expr(as_const(expr)).op();
954
+ // This is one of the few places where it's detectable
955
+ // that we are using "bool" for boolean operators instead
956
+ // of "int". We convert for this reason.
957
+ if(op.type().id() == ID_bool)
958
+ type = signed_int_type();
959
+ else
960
+ type = op.type();
961
962
963
exprt new_expr;
0 commit comments