standards/50889: NULL defined as 0 instead of (void *)0
M. Warner Losh
imp at bsdimp.com
Mon Apr 21 01:01:34 PDT 2003
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
More information about the freebsd-standards
mailing list