From owner-freebsd-standards@FreeBSD.ORG Wed Apr 16 08:00:56 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 354E537B404; Wed, 16 Apr 2003 08:00:56 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9369943F3F; Wed, 16 Apr 2003 08:00:54 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id BAA30383; Thu, 17 Apr 2003 01:00:42 +1000 Date: Thu, 17 Apr 2003 01:00:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Erik Trulsson In-Reply-To: <20030416125715.GA12300@falcon.midgard.homeip.net> Message-ID: <20030417005708.D6167@gamplex.bde.org> References: <200304161249.h3GCntqZ071047@freefall.freebsd.org> <20030416125715.GA12300@falcon.midgard.homeip.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: lamer@properfucked.net cc: freebsd-standards@freebsd.org cc: Jens Schweikhardt Subject: Re: standards/50889: NULL defined as 0 instead of (void *)0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 15:00:56 -0000 On Wed, 16 Apr 2003, Erik Trulsson wrote: > On Wed, Apr 16, 2003 at 05:49:55AM -0700, Jens Schweikhardt wrote: > > I agree, though, that it may be desirable to > > #define NULL ((void*)0) > > Unless you want to use the same definition for both C and C++. > In C++ the only valid way of defining NULL is > > #define NULL 0 > > because in C++ there is no automatic conversion between "pointer to > void" and other pointer types as there is in C. I agree. It may be, and is, also desireable to define NULL as 0. A bit more desireable IMO. Whichever detects the most bugs at compile time is best. Bruce