correct code for pointer subtraction
Bob Larson
blarson at skat.usc.edu
Wed Jan 4 17:30:07 AEST 1989
In article <2254 at iscuva.ISCS.COM> carlp at iscuva.ISCS.COM (Carl Paukstis) writes:
[discusssion of intel brain damage mostly omitted]
>At least Microsoft provides a
>way to get the correct result, albeit with some "unusual" coding - what
>does it take to get the right result in another 16-bit-int environment?
Pointer subtraction result is a long if int might not be big enough to
hold it. A couple of bugs in beta-test Mg were related to this. This
seems to be strictly an intel bug. (I've also used C compilers where
pointer subtraction resulted in a 16 bit int -- but only 64k bytes of
memory were addressable.)
--
Bob Larson Arpa: Blarson at Ecla.Usc.Edu blarson at skat.usc.edu
Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson
Prime mailing list: info-prime-request%ais1 at ecla.usc.edu
oberon!ais1!info-prime-request
More information about the Comp.lang.c
mailing list