Nice overview of undefined behaviour in LLVM: https://www.cs.utah.edu/~regehr/llvm-ub.pdf (looks like poison may be removed entirely!)
miniblog.
Related Posts
C++ no longer considers trivial infinite loops to be undefined behaviour! https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2809r3.html
Spotted in the release notes for the latest clang.
Crikey, users are asking ChatGPT about C++ undefined behaviour! Https://news.ycombinator.com/item?id=34706438
pop_back on an empty vector is UB apparently.
TIL that C++03 considered a file without a trailing newline to be undefined behaviour! https://stackoverflow.com/a/72377
This was fixed in C++11, but the problem was that #include was a textual operation that could produce invalid syntax if no newline was present.
