[Bug c/82149] New: match.pd: 2919: bad if test ?
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 8 16:35:00 GMT 2017
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));
More information about the Gcc-bugs
mailing list