https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91964
--- Comment #2 from Jörg Richter <joerg.rich...@pdv-fs.de> --- The only boolean context I see is the if(...). The if() is never used with enum constants/types, but only bool-s and int-s. So according to the warning name (int-in-bool-context) the warning can be expected in cases 1&3. But not in the cases with explicit bool-casts. But if cases 1&3 should warn for 'C'. I don't see a point to not warn for 'A' or 'B'.