This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49706] No warning for (!x > 1) which is always false


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49706

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-12 09:27:38 UTC ---
-Wtype-limits is apparently just in shorten_compare and vrp, while here it is
optimized by fold.  For
_Bool x;
...
if (x > 1)
or
struct { unsigned int i : 1; } x;
...
if (x.i > 1)
we don't warn either.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]