Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2003 02:01:06 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        ertr1013@student.uu.se
Cc:        schweikh@freebsd.org
Subject:   Re: standards/50889: NULL defined as 0 instead of (void *)0
Message-ID:  <20030421.020106.41513803.imp@bsdimp.com>
In-Reply-To: <20030416172723.GA13575@falcon.midgard.homeip.net>
References:  <20030416125715.GA12300@falcon.midgard.homeip.net> <20030417005708.D6167@gamplex.bde.org> <20030416172723.GA13575@falcon.midgard.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
I have a #define in my tree that I switch back and forth from time to
time:

#if defined(_cplusplus) || !defined(_NULL_VOID)
#define NULL 0L
#else
#define NULL (void *) 0
#endif

and I add -D_NULL_VOID to build when I want to detect problems that
(void *) 0 detects, then switch it back to 0 for the problems that
that detects.

You can't win here.  I'd be inclined to leave things as the status quo.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030421.020106.41513803.imp>