3 ms·
I don't get it. AFAIK the goal of optimizers is to generate faster code while preserving the initial visible behaviour. If the initial behaviour is undefined,
by Ace17 10y ago
I don't get it.
AFAIK the goal of optimizers is to generate faster code while preserving the initial visible behaviour.
If the initial behaviour is undefined, what can an optimizer try to preserve?
Could someone give an example on how it would be possible not to have "UB in the compiler", while still having optimizations?
- aqjune 10y agoCompiler's spec is that the behavior of compiled program must be one of the behavior of source program, which is called 'refinement'.