marxin added a comment. Analyzing errors spotted on GCC itself, I would suggest to have 3 values for detect_invalid_pointer_pairs: - 0 = disabled - 1 = all except comparison with zero (0x0) - 2 = all Thoughts? https://reviews.llvm.org/D38971