Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return
Btop
for undefined pointer comparisons in non-strict mode
Comparing pointers from different blocks with `< <= > >=` is undefined behavior in CompCert and in ISO C. So, it is sound to analyze such comparisons as `Bnone`. However, these comparisons occur in real code, and produce statically-unpredictable Boolean results, so it is safer and more consistent with other parts of the value analysis to return `Btop` in non-strict mode. Currently, this should make no difference to the generated code, since CompCert does not optimize based on the absence of undefined comparisons.
- Loading branch information