What Every C/C++ Programmer Should Know About Undefined Behavior
Recently I've read some great texts about undefined behavior on LLVM blog. It is devided into 3 parts ("part 1,":http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html "part 2 ":http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html and "part 3":http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html ), inspired by "John Regehr blog":http://blog.regehr.org/archives/213 (also 3 posts). In my opinion both sources are absolute must-read for every C/C++ programmer. You'll learn what is undefined behavior, what are its drawbacks and good sides, how compilers handles these situations and how code is optimized. Posts also contain many examples.
Thank you for sharing!