Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
From: walter@hpclwjm.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Re: subtraction between unsigned ints
Message-ID: <12570024@hpclwjm.HP.COM>
Date: 9 Sep 89 00:37:49 GMT
References: 
Organization: Hewlett-Packard Calif. Language Lab
Lines: 16

Norman Diamond writes:

>>Does pANSI defines the datatype of the result of subtraction
>>between unsigned integers?  Would it be also unsigned?  Then
>>what would be the result of subtraction of a number from a
>>smaller number?

>It always has been unsigned, even in K&R days.  pANS says that the
>result must wrap around modulo some power of 2; this was not required
>by K&R but surely always occured.

I think it was required by K&R.  See Appendix A, section 6.5, in the
first edition (page 184).

Walter Murray
--