Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Out of range pointers Message-ID: <1988Sep24.212709.26642@utzoo.uucp> Organization: U of Toronto Zoology References: <33432@cca.CCA.COM> <225800073@uxe.cso.uiuc.edu> Date: Sat, 24 Sep 88 21:27:09 GMT In article <225800073@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: >I don't understand this. I can understand that on certain wacko >architectures that computing it IN A SEGMENT REGISTER would cause >a problem. But why not do the computation in an ordinary >arithmetic register, presumably by casting to an integer type? For one reason, on machines with notions of data type at the hardware level, this may be illegal. For another reason, pointer arithmetic may be seriously unorthodox, to the point where doing it using integers may be much more expensive than using the segment registers. (One obvious way this can happen -- it almost did happen on the 68000 -- is that a pointer might not fit in an integer register.) -- NASA is into artificial | Henry Spencer at U of Toronto Zoology stupidity. - Jerry Pournelle | uunet!attcan!utzoo!henry henry@zoo.toronto.edu