https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68816
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> --- (In reply to Jonathan Wakely from comment #1) > there is no overflow in your example to detect, AFAIK, the if statement can only be true if overflow occurs. > I assume you're asking for the anti-pattern to be recognized and a > "condition is always false" warning issued, rather than silently assuming > the condition is always true and removing the check? Not sure what you are saying here, but I was rather hoping that gcc could detect pointer + unsigned < same pointer and issue a warning message about relying on undefined behaviour.