From owner-freebsd-arch Wed Aug 21 17: 0:12 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 6D52E37B401 for ; Wed, 21 Aug 2002 17:00:06 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFBC943E75 for ; Wed, 21 Aug 2002 17:00:05 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id QAA95908; Wed, 21 Aug 2002 16:58:54 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g7LNw8l08243; Wed, 21 Aug 2002 16:58:08 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200208212358.g7LNw8l08243@arch20m.dellroad.org> Subject: Re: NULL In-Reply-To: <20020821.173653.57449387.imp@bsdimp.com> "from M. Warner Losh at Aug 21, 2002 05:36:53 pm" To: "M. Warner Losh" Date: Wed, 21 Aug 2002 16:58:08 -0700 (PDT) Cc: freebsd-arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 M. Warner Losh writes: > : The patch makes 'make buildworld' and 'make buildkernel KERNCONF=LINT' > : work for me; fyi I have "NO_WERROR= YES" in /etc/make.conf. > : > : Does anyone have an objection to this patch? > > Yes. I'm not sure that (void *)0 is the right thing to do. It can > cause other problems and mask a different set of bugs, especially when > you call functions that have no prototype in scope. Can you elaborate? Seems like the same is true of "0".. e.g., suppose that pointers are larger than integers, and you call a variadic function with "NULL" as one of the extra parameters: printf("foo=%p num=%d\n", NULL, 123); This would get screwed with NULL=0 but work right with NULL=(void *)0. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message