3 ms·
Compilers are allowed to do whatever they want when encountering undefined behavior, not because it will never happen, but specifically because it’s undefined.
by jolux 5y ago
Compilers are allowed to do whatever they want when encountering undefined behavior, not because it will never happen, but specifically because it’s undefined.
- SAI_Peregrinus 5y agoAnd they're allowed to do whatever they want even with optimizations off.
- oconnor663 5y agoAnd future versions of your compiler are going to want to do different things with your UB than what your current compiler does.