The NULL macro is defined by many headers to expand to an implementation-defined null pointer constant. The advantage over using literal 0 is the warnings produced by current compilers on most forms of improper use. It might simply be defined as:
In standard C, this can be implemented as:
Some people claim that by a strict reading of the Standard, after parenthesising the expression
(void *)0, it's no longer a null pointer constant, even though the parentheses are simultaneously required by the Standard to protect the macro expansion. No one seems to dispute that it's the Standard's intention that
((void *)0) is a valid definition of NULL, nor that any other reading is sensible.