gcc interprets -0 incorrectly

Segher Boessenkool segher@koffie.nl
Fri Dec 20 00:30:00 GMT 2002


Justin Pryzby wrote:
> 
>  * From algebra: it is clear that for all x=-x, 2x=0, x=0.

x=0 is not implied by 2x=0 in this ring (the ring of integers
modulo some power of two); this ring is not an integral domain,
and 2 is a zero divisor.

-MIN_INT == MIN_INT  is perfectly fine, mathematically.


Segher




More information about the Gcc mailing list