[Bug c++/70181] missing -Wtautological-compare for constant expressions

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 11 08:28:00 GMT 2016


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think it is intentional, because it otherwise leads to way too many false
positives.  We don't warn for (0 == 0), that is very common, e.g. if the
constants come from macros.  And for constants it is the same thing.


More information about the Gcc-bugs mailing list