https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70800
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> --- I just discovered that clang++ can be made to find this bug by adding flag -Wtautological-compare. jan22a.cc:6:17: warning: bitwise comparison always evaluates to false [-Wtautological-compare] if ((n & 0x30) == 1) ~~~~~~~~~~~^~~~