Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!think!husc6!bbn!bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.lang.c Subject: Re: Dereferencing zero Message-ID: <292@fig.bbn.com> Date: 12 Jan 88 17:06:13 GMT References: <3306@ihlpf.ATT.COM> <7010@brl-smoke.ARPA> <1561@rtech.UUCP> <2953@zeus.TEK.COM> Followup-To: poster Organization: BBN Laboratories, Cambridge MA Lines: 15 > struct system_vectors *svp; > svp = 0; > (svp->whatever_vector)(); Isn't this code guaranteed by ANSI, K&R, H&S, (and Guy Harris :-) to be illegal? The minute you assign zero to a pointer you have essentially delcared that pointer invalid and illegal. I can understand why you might need/want to do this in system-specific code, but I don't understand how it's any more legal than strcpy(my_buf, 0) is. Replies to me and I'll summarize for the net. /r$ -- For comp.sources.unix stuff, mail to sources@uunet.uu.net.