5 ms·
I would argue that one good point of the article is to illustrate to its readers just what it means, that compilers assume code to be free of undefined behavior
by unwind 2y ago
I would argue that one good point of the article is to illustrate to its readers just what it means, that compilers assume code to be free of undefined behavior.
The resulting "reasoning" can be counter-intuitive, and seeing what happens and what problems it can introduce must be instructive to people who are not aware.
Better informed/educated C programmers is an improvement on the state of the world, in my opinion.
- titzer 2y agoMore knowledge is good. Hopefully it inspires people to avoid UB and demand better diagnostics and debugging tools for UB. Avoiding UB can include such activities as completely avoiding programming in the language that has UB. UB is a post-facto justification for compiler optimizations that only work on non-buggy programs. It's a circus because programs have bugs.