From owner-freebsd-hackers Fri Feb 14 20:36:34 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA28434 for hackers-outgoing; Fri, 14 Feb 1997 20:36:34 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA28429 for ; Fri, 14 Feb 1997 20:36:30 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id PAA04488; Sat, 15 Feb 1997 15:32:00 +1100 Date: Sat, 15 Feb 1997 15:32:00 +1100 From: Bruce Evans Message-Id: <199702150432.PAA04488@godzilla.zeta.org.au> To: hackers@FreeBSD.ORG, j@uriah.heep.sax.de Subject: Re: NULL as ((void*)0) (was Re: strlen() question) Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >anyway. Passing (void *)0 into a vararg list is as invalid as passing >0 there if the target type is e.g. char *. I think `char *' is required to have the same representation as `void *', so this particular pointer mismatch must work. >encouraged) C code. Inside a function call, you only need to cast it >into the correct target type if: 1) it's in a vararg list, or 2) it's >in an arg list of a function declared with obsolete K&R style only. If it's in an arg list of a function declared with obsolescent K&R style period. `void foo __P((bar_t *));' is declared with obsolescent K&R style if __P(x) expands to (). There is not much point in using __P() if you don't write K&R code (or in using prototypes and depending on K&R misfeatures). Bruce