Conversation
|
Could this cause issues with non-c99 code that does not expose a bool type? |
|
I don't think it can in Goblint because in other cases it could also return smaller ikinds than the program variables have, e.g. Another reason why this shouldn't be an issue is that we just use it for def_exc range, which is essentially an interval that may be smaller than the type's range if only small values are ever stored in such variable. The The only way I see this being a problem is if |
michael-schwarz
left a comment
There was a problem hiding this comment.
True! I think we can merge it then!
CHANGES: * Fix scope of enum definition in return type (goblint/cil#112, goblint/cil#113). * Fix signed integer left shift constant folding overflow (goblint/cil#122, goblint/cil#123). * Fix `fitsInInt` for booleans (goblint/cil#111). * Mark more loop statement locations synthetic (goblint/cil#125). * Optimize integer truncation (goblint/cil#115). * Fix FrontC and Cabs2cil partial application (goblint/cil#116). * Fix external usage of `freshLabel` (goblint/cil#121).
Upstream fix for the second issue in goblint/analyzer#827.
Technically the fix could even be moved up into
truncateCilint, whereIBoolis already specially handled, but for some reason as never truncating. SincetruncateCilintis transitively used all over the place, I didn't want to change it as the old logic might be there for some reason.fitsInIntis used little enough to see that it isn't used withIBoolanywhere previously, so no accidental behavior changes would occur.