There are multiple static analysis frameworks for verifying C code in aviation; Frama-C and Astrée just to name two.
https://frama-c.com/html/overview.html
If you've ever got in an aircraft it's too late, you've almost certainly been in one using C for flight control functions.