But I agree, using printf for constant strings is one step away from doing printf(x) which is a big no-no.
Joker_vD · 18m ago
Useless bit of compiler optimizations trivia: the "this printf() is equivalent to puts()" optimization seems to work by looking for the '%' in the format string, not by counting whether there is only one argument to printf(), e.g. if you add 42 as a second argument to the printf() — which is absolutely legal and required by the standard to Work as Intended™ — the resulting binary still uses puts().
> puts() writes the string s and a trailing newline to stdout.
int main() { puts("Hello World!"); }
https://godbolt.org/z/zcqa4Txen
But I agree, using printf for constant strings is one step away from doing printf(x) which is a big no-no.