I would like to add a CXXFLAG to my build systems that force the entire code-base to be well-defined. So every piece of code that exhibits undefined behaviour in a static fashion, should be refused by the compiler.
For instance reinterpret_cast<A*>(someIntPtr)->aMember is without any runtime context undefined (a), while int i = bar(); i /= i; could result in undefined behaviour (b) depending on the runtime evaluation of bar() (which could return zero).
I only expect the (a) cases to be caught, not necessarily the (b) cases.