That wouldn't just be a new compiler. That would be a new language. I dont think there are any short cuts to fix C.
C++ is doing something somewhat similar with the "C++ Core Guideline" rules, which are designed to be checkable by static analysis tool. The long term goal is that eventually C++ will become a safe subset, when all the error-prone parts of the language have replacements.
> "Following the rules will lead to code that is statically type safe, has no resource leaks, and catches many more programming logic errors than is common in code today. And it will run fast - you can afford to do things right."
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...