[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please don't do this (code fragment)



I don't find any such mention in K&R [1978].  There is nothing I can
see to guarantees that MAX_INT + 1 < 0.

On Tue, Jan 15, 2002 at 12:56:19AM +0100, Torsten Landschoff wrote:
> On Mon, Jan 14, 2002 at 10:03:59AM -0800, Thomas Bushnell, BSG wrote:
> > > I yet have to see a machine that does not use two's complement
> > > for integer arithmetic.
> > 
> > Actually, the C standard does essentially guarantee two's complement
> > arithmetic.  It specifies integer overflow behavior and
> > signed/unsigned conversion behavior exactly.
> 
> For real? Is that new with ISO C or was that in the original ANSI C
> standard as well? Sorry, I gave away my ANSI C book a while before
> and did not yet get it back :((
> 
> cu
> 	Torsten




Reply to: