4 ms·
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 "this function d
by jmgao 11y ago
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 "this function does printf, the format string is the nth argument, and the format arguments start at the mth argument".
It doesn't work with non-constexpr format strings, but there aren't many justifications for those.