On Mar 11 2007 18:01, Kyle Moffett wrote:On the other hand when __cplusplus is defined they define it to the "__null" builtin, which GCC uses to give type conversion errors for "int foo = NULL" but not "char *foo = NULL". A "((void *)0)" definition gives C++ type errors for both due to the broken C ++ void pointer conversion problems.
I think that the primary reason they use __null is so that you can
actually do
class foo *ptr = NULL;
because
class foo *ptr = (void *)0;
would throw an error or at least a warning (implicit cast from void*
to class foo*).