3 ms·
No, C explicitly does not define semantics; it still has them, because the underlying hardware and ABI provides them, whether the C standard likes it or not. Th
by a1369209993 8y ago
No, C explicitly does not define semantics; it still has them, because the underlying hardware and ABI provides them, whether the C standard likes it or not. That's the point: if the compiler isn't actively sabotaging you, you end up with the semantics of the macine code you're compiling to, and can benefit from obvious sanity checks like not mapping anything at address zero.
- pjmlp 8y agoThis is, those semantics you state as defined don't translate into portable C code, not even between compiler versions on the same platform.
- saagarjha 8y agoThere is a difference between implementation defined and undefined. Dereferencing a null pointer is undefined and cannot be performed in a well-formed program. Implementation specified behavior (e.g. sizeof(void *)) is dependent on the hardware and ABI.
- jcelerier 8y ago> it still has them, because the underlying hardware and ABI provides them, when you program in C you program against the C abstract machine, not against a particular hardware.