Article View: comp.std.c
Article #658Re: Out-of-bounds pointers
From: Doug Gwyn
Date: Tue, 03 Oct 1989 19:40
Date: Tue, 03 Oct 1989 19:40
12 lines
952 bytes
952 bytes
In article <1009@mtxinu.UUCP> ed@mtxinu.COM (Ed Gould) writes: >Is the following code conformant? It's clear that it's not legal to >dereference the pointer in its "illegal" state, but is the p++ line >guaranteed to return it to a valid value? It's not even "legal" to compute an invalid address, whether or not it is dereferenced. Your example has implementation-dependent behavior; it is not too unlikely that it would even abort under some circumstances. Pointers one past the end of an array are valid, but not pointers before the beginning of an array.
Technical Details
Message-ID:
<11213@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!gwynReferences:
<1009@mtxinu.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Out-of-bounds pointers Message-ID: <11213@smoke.BRL.MIL> Date: 3 Oct 89 19:40:29 GMT References: <1009@mtxinu.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12