Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!hp4nl!targon!andre From: andre@targon.UUCP (andre) Newsgroups: comp.lang.c Subject: Re: comp.std.c Keywords: ANSI C, hardware protection, out-of-bounds pointers Message-ID: <619@targon.UUCP> Date: 1 Sep 89 11:16:03 GMT References: <426@maytag.waterloo.edu> <10884@smoke.BRL.MIL> Reply-To: andre@targon.UUCP (andre) Organization: Nixdorf Computer BV., DO, P.O. Box 29,Vianen, The Netherlands Lines: 21 In article <10884@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: -In article <426@maytag.waterloo.edu> lhf@aries5 (Luiz H. deFigueiredo) writes: ->Now I ask, it is possible/legal to do the analogous thing for a-1 as in -> char *head=a-1; /* Here! */ - -The Standard does not guarantee that this will work, although it might work -uner some circumstances under some implementations. - -The asymmetry between last+1 (guaranteed) and first-1 (not guaranteed) is Does this mean that on OS/2 on an '386 with a buffer gotten from the system, the compiler sees to it that the char *head does never! ends up in an address register? Or else the '386 will give an exeption (also if you never dereference the register, or segment - offset that make up the 'address register'). -- \---| AAA DDDD It's not the kill, but the thrill of the chase. \ | AA AAvv vvDD DD Ketchup is a vegetable. /\ \ | AAAAAAAvv vvDD DD {nixbur|nixtor}!adalen.via _/__\__\| AAA AAAvvvDDDDDD Andre van Dalen, uunet!hp4nl!targon!andre