https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106774
--- Comment #6 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- > --- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> --- > (In reply to Richard Biener from comment #3) > > that's more coding style though? > > Yeah I personally prefer the more explicit way of writing it with both > operands > myself It's not really about operands, but the whole operation is redundant: "mybool == true" is exactly equivalent to just "mybool". So it's similar to a cast to the original type which GCC can also warn about (-Wuseless-cast). Some other existing warnings (-Wredundant-decls, -Wredundant-move) also seem to warn about things that are no potential problems, just redundant. Of course, all of this can be considered a matter of style, that's why warnings can be selected by options. (As I said, I assume it would not be enabled by -Wall, and I don't mind whether or not it's enabled by -Wextra.)