From owner-freebsd-arch Tue Aug 20 17:21:28 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7791437B400 for ; Tue, 20 Aug 2002 17:21:24 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3C4043E3B for ; Tue, 20 Aug 2002 17:21:23 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.5/8.12.2) with ESMTP id g7L0LH27033274; Tue, 20 Aug 2002 17:21:17 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.5/8.12.5/Submit) id g7L0LGoZ033273; Tue, 20 Aug 2002 17:21:16 -0700 (PDT) Date: Tue, 20 Aug 2002 17:21:16 -0700 From: "David O'Brien" To: Archie Cobbs Cc: freebsd-arch@freebsd.org Subject: Re: NULL Message-ID: <20020821002116.GA33223@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: <200208202344.g7KNioV03523@arch20m.dellroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208202344.g7KNioV03523@arch20m.dellroad.org> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Aug 20, 2002 at 04:44:50PM -0700, Archie Cobbs wrote: > Simple question... > Why isn't NULL defined to be "((void *)0)" instead of "0" ? In C++ this is not legal: void blah(void) { int *foo; void *bar; bar = foo; foo = bar; } it is in C, but we share the definition. A benefit of "(void *)0" is that this would be caught: char c = NULL; rather than the correct: char c = '\0'; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message