printf has type checking in every major compiler. You just need to annotate all of your printf-y functions with attributes to tell the compiler &quot;this function does printf, the format string is the nth argument, and the format arguments start at the mth argument&quot;.<p>It doesn&#x27;t work with non-constexpr format strings, but there aren&#x27;t many justifications for those.