And again, my favorite accidental usages of undefined behaviour in C++ are optimised into BS.<p>(1) if (this == NULL): this is super useful in non-virtual functions, because NULL is the object that subclasses all classes, so the only universal error object.<p>(2) memset in operator new: in C++03, we did not have initialisers inside struct{}, so quicky zero the obj to avoid error-prone manual inits of all embedded ints.<p>This is really becoming ridiculous.  Having a notion of how C&#x2F;C++ corresponds to what the machine will do seems to be more and more regarded as evil.