[Bug middle-end/22072] bizarre code for int*int/2
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 17 01:08:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-17 01:08 -------
(In reply to comment #8)
> did i miss something in my math?
Yes in C, % (remainder and not mod) is negative iff one of the operands is negative.
so it is -2*2 + -1 = -5. , integer divide in C is truncated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22072
More information about the Gcc-bugs
mailing list