3 ms·
The C standard is not the Bible, it is not written by an almighty god. As respectable K&R are, they are humans who wrote a standard for their own needs, based o
by GuB-42 5y ago
The C standard is not the Bible, it is not written by an almighty god. As respectable K&R are, they are humans who wrote a standard for their own needs, based on the state of the art of that time. Sadly C is the work of mortals...
Reading the standard trying to understand the way of god like religious scholars do is a pointless exercise. Modern compiler developers found that exploiting undefined behavior the way we do new leads to interesting optimization, others found it reasonable so now it is the standard.
I think the issue most people have now is that compilers use advanced solvers that are able to infer a lot from undefined behavior and other things, so UB is no longer just "it works or it crashes".