[Bug c/64249] Missing warning for if (A) else if (A)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 10 11:27:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64249

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-10
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps we shouldn't warn if conditionX is diagnosed for other reasons (always
true or always false).  And, if (conditionZ) { ... } else if (conditionX) { ...
} else if (conditionX) { ... } else { ... }
should be of course diagnosed too.



More information about the Gcc-bugs mailing list