I must be missing something here, but can&#x27;t you simply not invoke undefined behavior in your program? That way, you don&#x27;t have to worry about what your compiler will do when it encounters undefined behavior.