https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111575
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |77876 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For most people getting ~0 (-1) and ~1 (-2) is not going to be what they expected. They had expected 0/1 still. But with the NOT effect. writting it out using an extra variable will cause the warning to not to be there. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77876 [Bug 77876] -Wbool-operation rejects useful code involving '~'