Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!ima!haddock!darryl
From: darryl@haddock.UUCP
Newsgroups: net.lang.c
Subject: Re: lint, pointers, 0 (what else?)
Message-ID: <342@haddock.UUCP>
Date: Fri, 8-Feb-85 23:49:28 EST
Article-I.D.: haddock.342
Posted: Fri Feb  8 23:49:28 1985
Date-Received: Sun, 10-Feb-85 04:03:02 EST
Lines: 22
Nf-ID: #R:harvard:-36600:haddock:12400017:000:1158
Nf-From: haddock!darryl    Feb  7 19:09:00 1985

>The Motorola 68000 speaks with forked tongue here.  16 bits is suggested
>by the 16-bit data paths used for non-address arithmetic (2 extra clocks
>for a 32-bit "add", f'rinstance), by the lack of 32-bit multiply or
>divide instructions, and by the 16-bit external bus.  32 bits is suggested
>by the large address space.  There is, thus, a good reason for having
>sizeof(int) == 2 and sizeof(char *) == 4 - speed of execution.  There is
>also a good reason for having them both == 4 - it would be nice to have
>an "int" hold the size of an object larger than 65535 bytes.  There's
>a tradeoff here; depending on your application, either one could be the
>correct choice.
>
>        Guy Harris
>        {seismo,ihnp4,allegra}!rlgvax!guy

I agree with your points, Guy, but I just want to add one more here:  K&R
does say that the difference of two pointers is an INT.  If you want arrays
bigger than 32k-1 elements in your large address space, best to go with 32
bit ints on the 68000.  The draft standard removes this problem by making
the size of the result of a pointer subtractiion implementation-defined.

		--Darryl Richman
		...!cca!ima!ism780!darryl