[Bug c/64249] New: Missing warning for if (A) else if (A)
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 10 08:14:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64249
Bug ID: 64249
Summary: Missing warning for if (A) else if (A)
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
E.g. here we should warn:
if (conditionX)
{
}
else if (conditionY)
...
when the two conditions don't have side-effects and are operand_equal_p.
Cf. https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00875.html
More information about the Gcc-bugs
mailing list