You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following fails with cbmc --cover location --function bitwise1.f bitwise1.class with the above error.
public class bitwise1
{
static char c;
void f()
{
int i = (c & 2);
}
}
In boolbvt_bitwise::convert_bitwise the reported width of the char operand is 16 (from std::size_t width=boolbv_width(expr.type());) but the size of the converted operand is 32. Java uses widening numeric promotion to int in this case. Interestingly, this program does not produce the above error in the following version (1 instead of 2):
public class bitwise1
{
static char c;
void f()
{
int i = (c & 1);
}
}
The text was updated successfully, but these errors were encountered:
The following fails with
cbmc --cover location --function bitwise1.f bitwise1.class
with the above error.In
boolbvt_bitwise::convert_bitwise
the reported width of thechar
operand is 16 (fromstd::size_t width=boolbv_width(expr.type());
) but the size of the converted operand is 32. Java uses widening numeric promotion toint
in this case. Interestingly, this program does not produce the above error in the following version (1 instead of 2):The text was updated successfully, but these errors were encountered: