2 ms·
There are two target groups for a C/C++ compiler: 1) embedded or OS hackers: they want code generation to be predictable and dislike surprising optimizations.
by samus 4y ago
There are two target groups for a C/C++ compiler:
1) embedded or OS hackers: they want code generation to be predictable and dislike surprising optimizations. To them, undefined behavior is behavior outside the standard specific to certain compilers that they expect to not suddenly change.
2) application and especially HPC developers. They want the compiler to exploit every trick in the literature to improve performance. In return, they are aware that undefined behavior cannot be relied on.
Any compiler that is popular with both crowds would have to strike a compromise.