Fix handling of case range statement in special case#3055
Fix handling of case range statement in special case#3055tautschnig merged 2 commits intodiffblue:developfrom
Conversation
|
Edit: sorry, I should have read the comment on #2905 first. #2905 is merged, this one should now be rebased (and then likely needs more discussion). |
allredj
left a comment
There was a problem hiding this comment.
Passed Diffblue compatibility checks (cbmc commit: a076249).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86181339
In the case where a gcc case range switch statement has a case that reduces to an empty expression, both gcc and clang reluctantly accept it, producing warnings. CBMC up until now was asserting against that case, and this divergence in behaviour was unwanted.
a076249 to
7685476
Compare
|
@tautschnig I have rebased it appropriately now. It should be ready for more discussion/review now. |
tautschnig
left a comment
There was a problem hiding this comment.
Could you please add another test case where all/the only case is an empty one? Basically a variant of the existing goto_convert_switch_range_empty test without the default case.
allredj
left a comment
There was a problem hiding this comment.
Passed Diffblue compatibility checks (cbmc commit: 7685476).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86275983
|
@tautschnig Yes, done. |
allredj
left a comment
There was a problem hiding this comment.
Passed Diffblue compatibility checks (cbmc commit: 5da7d4f).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86295457
In the case where a gcc case range switch statement has a case that reduces to an empty expression, both gcc and clang reluctantly accept it, producing warnings. CBMC up until now was asserting against that case, and this divergence in behaviour was unwanted.