https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105164
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org Status|ASSIGNED |NEW --- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- Well, I doubt the warning is much useful. There are situations where we can't use short-circuit evaluation: gcc/c-family/c-attribs.cc:2384: else if (TREE_CODE (decl) == FUNCTION_DECL && (((curalign = DECL_ALIGN (decl)) > bitalign) | ((lastalign = DECL_ALIGN (last_decl)) > bitalign))) or we want to quickly and flags of a struct: gcc_checking_assert (!IDENTIFIER_KIND_BIT_2 (id) & !IDENTIFIER_KIND_BIT_1 (id) & !IDENTIFIER_KIND_BIT_0 (id)); Note a different code is generated for situations like: return foo() && bar() && baz (); and return foo() & bar() & baz (); So I don't think we should change the code based on the warnings.