More examples on how C++ can go wrong.
Continuation from http://stackoverflow.com/documentation/c%2B%2B/1812/undefined-behavior#t=201705050731006995217