3 ms·
* Most forms of undefined behavior don't have any meaningful use to compilers. * With integer overflow it would be relatively easy to write a spec that allows
by Dylan16807 8y ago
* Most forms of undefined behavior don't have any meaningful use to compilers.
* With integer overflow it would be relatively easy to write a spec that allows "n+1>n" optimizations but not utterly anything to happen. With strict aliasing it's probably not too hard either. You'd still see some program misbehavior in the strict aliasing case, but it would be a vastly reduced set of misbehavior. And allowing signed numbers to act more like abstract numbers would often decrease misbehavior.