Path: utzoo!mnetor!uunet!husc6!yale!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Dereferencing zero Message-ID: <7063@brl-smoke.ARPA> Date: 13 Jan 88 05:39:33 GMT References: <3306@ihlpf.ATT.COM> <7010@brl-smoke.ARPA> <1561@rtech.UUCP> <2953@zeus.TEK.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <2953@zeus.TEK.COM> dant@tekla.UUCP (Dan Tilque) writes: > struct system_vectors *svp; > svp = 0; > (svp->whatever_vector)(); If you really have to do something like this, odds are your compiler will support it. However, be aware that you have really, according to the proposed C standard, made `svp' a null pointer by the assignment, and an implementation may represent null pointers specially. There are many reasons for that that I don't want to get into. Just remember that the C standard does not guarantee that you can ever use 0 as the address of an object (quite the contrary), but some implementations may permit it.