[Bug c++/61867] gcc can't detect obviously false test

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 23 12:44:00 GMT 2014


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Indeed we don't want to warn here.  The knowledge is spread across two
different
statements and that's already too far for this kind of thing.

Remember we just "weakened" the transposed memset arg warning to not warn
about

n = 0;
memset (p, 'x', n);

but only about

memset (p, 'x', 0);



More information about the Gcc-bugs mailing list