Date: Wed, 21 Aug 2002 22:45:13 -0400 (EDT) From: Garrett Wollman <wollman@lcs.mit.edu> To: archie@dellroad.org Cc: arch@FreeBSD.org Subject: Re: NULL Message-ID: <200208220245.g7M2jD8A004461@khavrinen.lcs.mit.edu> In-Reply-To: <200208212358.g7LNw8l08243@arch20m.dellroad.org> References: <20020821.173653.57449387.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <200208212358.g7LNw8l08243@arch20m.dellroad.org> you write: >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. That's a feature. (Unfortunately, this feature is not implemented on ILP32 architectures. Is 0LL allowed as a null pointer constant? That would break everyone equally in this case.) The ultimate answer is that both definitions are useful for finding (or papering over) different bugs. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208220245.g7M2jD8A004461>