Xref: utzoo comp.lang.c:6668 comp.sys.m68k:682 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c,comp.sys.m68k Subject: Re: C machine Message-ID: <7117@brl-smoke.ARPA> Date: 18 Jan 88 01:11:09 GMT References: <461@auvax.UUCP> <9961@mimsy.UUCP> <166@teletron.UUCP> <6936@brl-smoke.ARPA> <147@ateng.UUCP> <39aca826.7f32@apollo.uucp> <7092@brl-smoke.ARPA> <708@umbc3.UMD.EDU> <7109@brl-smoke.ARPA> <712@umbc3.UMD.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 20 In article <712@umbc3.UMD.EDU> alex@umbc3.UMD.EDU (Alex S. Crain) writes: > I don't really understand the answer, I think you said "impementation >dependant". If so, how is that a fix? It *is* implementation-dependent, whether or not you like it that way. The "fix" is to quit insisting that ptrdiff_t has to be int and to permit it to be long where necessary. > when ... i say > funcall (ptr1 - ptr2); /* ptr1 - ptr2 > 64k */ >what happens? or do I just check stddef.h for the answer? What do you mean, what happens? You pass an argument having some signed integral type to funcall(). Presumably you have properly declared funcall() as in extern void funcall( ptrdiff_t ); If you don't like using a type other than a known basic type, you can of course coerce the ptrdiff_t into a long via a (long) cast, but seldom is this necessary or useful. (It is necessary if you're going to printf() the value of a ptrdiff_t.)