--- Comment #5 from pinskia at gcc dot gnu dot org 2007-01-15 20:04 ---
*** Bug 30475 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
---
--- Comment #4 from pinskia at gcc dot gnu dot org 2006-04-28 16:29 ---
(In reply to comment #3)
> Ok, you are right. it would be nice if g++ 4.1.0 acts as what g++ 3.3.4 does.
Use -fwrapv if you want defined wrapping.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27257
--- Comment #3 from johnzhang at tencent dot com 2006-04-28 06:36 ---
Ok, you are right. it would be nice if g++ 4.1.0 acts as what g++ 3.3.4 does.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27257
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-22 15:35 ---
This is signed int overflow being undefined, in fact I should I know because I
was the one who write the patch to optimize this.
--
pinskia at gcc dot gnu dot org changed:
What|Removed
--- Comment #1 from pluto at agmk dot net 2006-04-22 08:23 ---
(In reply to comment #0)
> int b = 0X8000;
> if ((b - 10) < 0)
b - 10 is 0xff(...)7ff6 and this is an integer overflow.
[ cite: c++ standard / $5.5 ]
if during the evaluation of an expression the