[Bug c/23600] Invalid code optimization for x*const/const

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Aug 28 01:50:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-28 01:48 -------
this is invalid as overflow is undefined so multiplying by a number and then dividing by the same 
number is always true as the multiply can overflow which is undefined so say it is the same as doing it 
in the math world.

If you want overflow to be defined as wrapping use -fwrapv.

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


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



More information about the Gcc-bugs mailing list