https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82149
Bug ID: 82149 Summary: match.pd: 2919: bad if test ? Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- As a result of a build with -Wlogical-op generic-match.c:1358:77: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op] Source code is bool exception_p = real_isnan (cst) && (cst->signalling || (cmp != EQ_EXPR || cmp != NE_EXPR)); Maybe better code bool exception_p = real_isnan (cst) && (cst->signalling || (cmp != EQ_EXPR && cmp != NE_EXPR));