This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc interprets -0 incorrectly
- From: Segher Boessenkool <segher at koffie dot nl>
- To: Justin Pryzby <justinpryzby at users dot sourceforge dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Dec 2002 20:55:31 +0100
- Subject: Re: gcc interprets -0 incorrectly
- References: <20021206224313.GA17796@perseus.homeunix.net>
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