3 ms·
This is still wrong though, since UB doesn't exist at an assembly level, and yet C has it. Therefore there is no clear mapping from C to assembly (even consider
by Diggsey 4y ago
This is still wrong though, since UB doesn't exist at an assembly level, and yet C has it. Therefore there is no clear mapping from C to assembly (even considering hypothetical ISAs).
- j-pb 4y ago> UB doesn't exist at an assembly level cough https://riscv.org/wp-content/uploads/2018/05/10.45-clifford-barcelona.pdf https://riscv.org/wp-content/uploads/2018/05/10.45-clifford-... There are plenty of undefined things in ISAs, writing to some internal ARM registries also springs to mind, but that's a bit of a red herring. Just because code with undefined behaviour doesn't map to some abstract machine model nicely, doesn't imply that code that doesn't invoke UB can't have a simple mapping to some abstract machine semantics.
- vintermann 4y agoYes, things like illegal opcodes, or other things the hardware _does_ but isn't officially part of the spec... those things are almost as old as computers. Certainly as old as home computers. The VSP hack on Commodore 64 comes to mind.