[Bug c/17645] Add a warning for potentially unsafe unsigned operations

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 6 02:34:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-06 02:33 -------
(In reply to comment #6)
> It looks like -ftrapv only works on signed overflow.
Yes because signed overflow is undefined.  unsigned overflow wraps by both the C and C++ standards.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |c


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



More information about the Gcc-bugs mailing list