This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41882] gcc bug when comparing x to -x (linux, 32-bit)
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2009 09:38:18 -0000
- Subject: [Bug c/41882] gcc bug when comparing x to -x (linux, 32-bit)
- References: <bug-41882-18374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from ebotcazou at gcc dot gnu dot org 2009-10-31 09:38 -------
> Thanks for your quick response. I would like to point out that on every
> compiler and machine I've used, the behavior of signed overflow may not be
> defined -- but it's always been consistent.
Consistency on undefined behavior is not mandated (it's a tautology) and would
have a substantial cost. You can use -Wstrict-overflow to detect these cases.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41882