Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Out of range pointers Message-ID: <8544@smoke.ARPA> Date: 20 Sep 88 20:44:53 GMT References: <867@osupyr.mast.ohio-state.edu> <3200@geac.UUCP> <1430@ficc.uu.net> <1988Sep15.145026.20325@ateng.uucp> <16041@ism780c.isc.com> <8515@smoke.ARPA> <33432@cca.CCA.COM> <1988Sep19.213023.13181@utzoo.uucp> <33547@XAIT.XEROX.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <33547@XAIT.XEROX.COM> g-rh@XAIT.Xerox.COM (Richard Harter) writes: >As a side note, one argument for making x[-1] legal is that it permits >you to use sentinels in both directions. I don't see that this is a >problem, regardless of architecture. All that is required is that nothing >be allocated on a segment boundary. There is a considerable practical difference between this case and the one for a pointer just past the last member of an array. The [-1] case can require reservation of an arbitrary amount of unused address space below an actual object, whereas the other case requires no more than a byte (or a word, depending on the architecture) of space reserved above.