Received: by taz.hyperreal.com (8.6.12/8.6.5) id HAA19669; Tue, 2 Jul 1996 07:11:42 -0700 Received: from epprod.elsevier.co.uk by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id HAA19663; Tue, 2 Jul 1996 07:11:37 -0700 Received: from snowdon.elsevier.co.uk (snowdon.elsevier.co.uk [193.131.197.164]) by epprod.elsevier.co.uk (8.6.13/8.6.12) with ESMTP id PAA11255 for ; Tue, 2 Jul 1996 15:10:01 +0100 Received: from cadair.elsevier.co.uk (actually host cadair) by snowdon with SMTP (PP); Tue, 2 Jul 1996 15:10:22 +0100 Received: (from dpr@localhost) by cadair.elsevier.co.uk (8.6.12/8.6.12) id PAA29876; Tue, 2 Jul 1996 15:09:26 +0100 Date: Tue, 2 Jul 1996 15:09:26 +0100 Message-Id: <199607021409.PAA29876@cadair.elsevier.co.uk> To: new-httpd@hyperreal.com Subject: Re: I *don't* want Paul's style guide. In-Reply-To: <9607021006.aa16908@gonzo.ben.algroup.co.uk> References: <9607021006.aa16908@gonzo.ben.algroup.co.uk> From: Paul Richards X-Attribution: Paul X-Mailer: GNU Emacs [19.30.1], RMAIL, Mailcrypt [3.3] Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Ben Laurie writes: > > In particular what happens when sizeof(char *) > sizeof(int) > > e.g. Cray or Digital UNIX, or when NULL != (void *)0 (maybe on some > > microsoft systems) ? > > Also quoting K&R: "The symbolic constant NULL is often used in place of zero". Yeah but the next line says "The symbolic constant NULL is often used in place of zero, as a mnemonic to indicate *more clearly* that this is a special value for a pointer" emphasis is obviously mine :-) Just above that it says "Pointers and integers are not interchangeable. Zero is the sole exception...", which is why using NULL is good practice to clearly show it's a pointer and not an integer that's being used. A null pointer is definately zero, from the Appendix in K&R A6.6 An integral constant expression with value 0, or such an expression cast to type void *, may be converted, by a cast, by assignment, or by comparison, to a pointer of any type. This produces a null pointer that is equal to another null pointer of the same type, but unequal to any pointer to a function or object.