3 ms·
Guess there's some bigger context that I'm missing here. I wouldn't have expected saying "Understanding how your compiler enforces it's abstract machine is bene
by archgoon 7y ago
Guess there's some bigger context that I'm missing here. I wouldn't have expected saying "Understanding how your compiler enforces it's abstract machine is beneficial" would be a controversial position to take.
- ralfjung 7y ago> Understanding how your compiler enforces it's abstract machine is beneficial The compiler does not enforce it though. It only implements the abstract machine, and the implementation is only correct for UB-free programs.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- archgoon 7y agoWhen you are in UB it's even more interesting to ask what the hardware actually does because the standard will not specify anything.
- Rusky 7y agoNo, that's when it's least interesting to ask what the hardware does. A program with UB will not reliably compile to any particular hardware behavior, so changing unrelated parts of the program or upgrading your compiler can change which hardware behavior you get. The actual hardware behavior is useful for other purposes, like understanding why the abstract machine is the way it is, or understanding and improving the performance of well-defined programs, but it is not useful at all once you have UB.
- archgoon 7y agoIt's interesting to me, and it's interesting to the first person in this thread. I'm sorry that you feel that were wasting our time.