News for hackers. Stuff that matters.
Re:GCC and Clang handle statically known undefined behaviour by unwind on Tuesday June 25, 2024 @09:17AM (#40788239)
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.

Re:GCC and Clang handle statically known undefined behaviour by titzer on Tuesday June 25, 2024 @09:51AM (#40788633)
More 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.