This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc trunk vs python
- From: Michael Veksler <mveksler at techunix dot technion dot ac dot il>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>, gcc at gcc dot gnu dot org, mveksler at techunix dot technion dot ac dot il
- Date: Thu, 24 Aug 2006 09:31:33 +0300
- Subject: Re: gcc trunk vs python
- References: <20060824041245.A44A011000B@bromo.msbb.uc.edu> <44ED42EF.2050307@lu.unisi.ch>
Paolo Bonzini wrote:
Jack Howarth wrote:
+ if (y == -1 && x < 0 && ((unsigned)x) == -(unsigned)x)
return DIVMOD_OVERFLOW;
or just a much clearer
if (y == -1 && x == INT_MIN)
return DIVMOD_OVERFLOW;
(possibly with a #include <limits.h> at the top).
Nit picking -
"x" is of type long, so the fix should be either x==LONG_MIN or
(unsigned long)x == -(unsigned long)x.
This is completely off-topic on this list. I am sending this to the list
only to avoid having buggy code on the gcc-ml archives.
Michael