3 ms·
I think the point of the OP is that you shouldn't think about the optimizations a compiler might do, but what the language spec guarantees. If the language spec
by charleslmunger 7y ago
I think the point of the OP is that you shouldn't think about the optimizations a compiler might do, but what the language spec guarantees. If the language spec guarantees that your code behaves the way you want, no correct compiler will break it.
- zokier 7y agoThe problem arises when the language simply does not provide any guarantees on the sorts side-effects you are interested in, so you can not simply rely on specified behavior.
- zaarn 7y agoAnd next thing you know, 1000 people with compilers that subtle do not behave to spec knock on your door.