unsigned int mul(unsigned int x, unsigned int y) { return x * y; }
Or there are many high level function structures as, which also has no UB (with some assumption on the called functions):
void bar() { struct foo *p = foo_alloc(); foo_do1(p); foo_do2(p); foo_delete(p); }
Such code can be easily screened and also this can be done automatically. There is a lack of open-source which can do this, but I have an experimental GCC branch which starts to do this and looks promising.