The only hack I could think of is having the compiler front end generate calls to different functions based on the content of the format string, similar to how some compilers replace memset with a 32-bit memset based on the type of the destination pointer
And it all falls apart as soon as a format string cannot be known at compile time.
And it all falls apart as soon as a format string cannot be known at compile time.