Xref: utzoo comp.std.c:876 comp.lang.c:16789 Newsgroups: comp.std.c,comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: detecting invalid pointers Message-ID: <1989Mar8.174556.1389@utzoo.uucp> Organization: U of Toronto Zoology References: <15495@cup.portal.com> Date: Wed, 8 Mar 89 17:45:56 GMT In article <15495@cup.portal.com> Kevin_P_McCarty@cup.portal.com writes: >Is there any guaranteed way to detect an out of range pointer, >i.e., one which is supposed to point into an array but might not? No. There simply is no way to do this portably, since the results of pointer comparisons (ignoring NULL for the moment) are well-defined only within the array. -- The Earth is our mother; | Henry Spencer at U of Toronto Zoology our nine months are up. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu