3 ms·
The post cites the spec. The C standard clearly seems to state that & must reference "an object", and NULL does not reference an object. A "pointer to any objec
by pcwalton 12y ago
The post cites the spec. The C standard clearly seems to state that & must reference "an object", and NULL does not reference an object. A "pointer to any object" is distinguished from a null pointer.
Do you have links stating otherwise?
- Gibbon1 12y agoAn of course plain C does not have 'objects' and a _lot_ of architectures have stuff mapped at address 0x0
- aidenn0 12y agoC absolutely does have objects.
- rcfox 12y agoWhile C is not an "object-oriented" language, it does have a concept of an object: http://port70.net/~nsz/c/c99/n1256.html#3.14p1 http://port70.net/~nsz/c/c99/n1256.html#3.14p1
- nullc 12y agoYou may be mistaking C for a fancy macro assembler. It's not-- It's a high level language, even though a fairly low level looking one. The obligation of the language is to behave as the spec says, and there may not be a close mapping between your program and what runs on the machine, though there often is. An "Object" is a concept defined and used extensively in the language specification; "a region of data storage in the execution environment,".