This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17645] Add a warning for potentially unsafe unsigned operations
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jul 2005 02:33:57 -0000
- Subject: [Bug c/17645] Add a warning for potentially unsafe unsigned operations
- References: <20040924041536.17645.mathieu@malaterre.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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