Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Invalid Pointers Message-ID: <10541@smoke.BRL.MIL> Date: 17 Jul 89 15:08:13 GMT References: <20245@adm.BRL.MIL> <4348@eos.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Followup-To: comp.lang.c Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <4348@eos.UUCP> jbm@eos.UUCP (Jeffrey Mulligan) writes: -It has been pointed out that there should be no assumptions -about what addresses are valid; is there any way to get -a guaranteed INVALID address? A null pointer is guaranteed not to match any valid object address. -#define NO_FOOBAR ((struct foobar *) -1 ) is what I use, but... This is not portable. Just use NULL.