i'm wondering, could Sparse be extended to check for such patterns?
People are regularly running "make C=1" and are sending fixes to make
entire subsystems sparse-warning-free, so Sparse is a nice mechanism
that works and it keeps code clean in the long run.
I dont think the "!X & Y" pattern is ever used legitimately [and even if
it were used legitimately, it's easy to avoid the sparse false positive
- while in the buggy case we have a clear bug].
Ingo
--