[Bug c/83122] -Wconversion and shifting bitwise

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 23 10:38:00 GMT 2017


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-11-23
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  The same probably happens with a division.

Note it might be an inherent limitation of the warning given apart from some
simple cases like yours we can't really tell the value range of the stored
value.  This is why it says "may" alter its value.


More information about the Gcc-bugs mailing list