4 ms·
The answer is yes. Compiler authors absolutely take advantage of these things for optimizations. As for paranoia about undefined behavior? Compilers won't emit
by UncleMeat 5y ago
The answer is yes. Compiler authors absolutely take advantage of these things for optimizations.
As for paranoia about undefined behavior? Compilers won't emit a program to call you a pizza or format your disk. There are risks, but those aren't real ones.
- a_t48 5y agoA bit of a nit - your storage driver could absolutely emit a program that formats your disk due to undefined behavior.
- UncleMeat 5y agoIf you already have a problem that contains instructions that are manipulating your disk in these sorts of ways then this is within some reason. But the usual hyper-concern about UB is that it'll take a program that otherwise does completely different things (imagine some CLI utility that just reads from stdin) and instead produce some maximally adversarial program that ruins your life. This ins't a real concern.
- a_t48 5y agoAgree :)