🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #20751

Re: C pointers in longs (was Re: looking for >32-bit address space)

#20751
From: Henry Spencer
Date: Fri, 14 Apr 1989 15:57
11 lines
953 bytes
In article <11274@tekecs.GWD.TEK.COM> andrew@frip.wv.tek.com (Andrew Klossner) writes:
>But an int must still accommodate the result of subtracting two
>pointers into the same array...

Nope, sorry, a "ptrdiff_t" must accommodate that result.  There is
absolutely no guarantee that ptrdiff_t == int; all you know is that
it's some signed integer type and it's defined in one of the standard
headers.
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
Technical Details
Message-ID: <1989Apr14.155719.27641@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <2569@elxsi.UUCP> <28200298@mcdurb> <1422@auspex.auspex.com> <11274@tekecs.GWD.TEK.COM>

Show Full Headers
Complete Article Headers
Newsgroups: comp.arch
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: C pointers in longs (was Re: looking for >32-bit address space)
Message-ID: <1989Apr14.155719.27641@utzoo.uucp>
Organization: U of Toronto Zoology
References: <2569@elxsi.UUCP> <28200298@mcdurb> <1422@auspex.auspex.com> <11274@tekecs.GWD.TEK.COM>
Date: Fri, 14 Apr 89 15:57:19 GMT