You don't get to write C and complain about UB breaking your code at the same time.
A bunch of UB is of course static, and often comes with compiler warnings. Some UB doesn't have compiler warnings, but is found by linters and analysers (such as clang static analyzer).