3 ms·
I was under the impression that NULL is required to be zero by the standard by now. If still not, it's high time that they give up! Differences like this bet
by alok-g 16y ago
I was under the impression that NULL is required to be zero by the standard by now. If still not, it's high time that they give up! Differences like this between theory and practice do not go away easily. The decision is changing which one is easier, the culture or the rule...
- caf 16y agoIt hasn't, and it won't, because a definition of NULL as "all-bits-zero" would be inconvenient for some embedded systems, where I/O ports or interrupt vectors are mapped at low addresses.
- mukyu 16y agoThere are two separate NULLs. In C for instance a pointer with the value 0 is a "null pointer". This is a language construct. When a compiler sees this construct it knows to use whatever it thinks is best to represent a null pointer on the target architecture (which may not be the same thing as a representation of the value 0).