[Bug c++/91964] Wrong -Wint-in-bool-context warning for enum constant
joerg.richter@pdv-fs.de
gcc-bugzilla@gcc.gnu.org
Wed Oct 2 09:30:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91964
--- Comment #2 from Jörg Richter <joerg.richter@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'.
More information about the Gcc-bugs
mailing list