NULL is (as of C1X April 2011 draft) an implementation-defined null pointer constant. OTOH, chapter "126.96.36.199 Pointers" clause 3 says that "An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant."
There are some other references to void * type. For example, chapter "6.2.5 Types" clause 28 tells that "A pointer to void shall have the same representation and alignment requirements as a pointer to a character type."
Joined: 24 Aug 2004
Location: Misner space
NULL is ... an implementation-defined null pointer constant.
That sounds more like the reality. I couldn't see any reason why NULL has to be always zero. It is only by convention that people expect it to be zero. And I think that to be a genuine NULL it should exist outside of the number space completely and not have any numeric value.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum