Will it warn you if you pass a 32-bit unsigned integer to a %lu format? It should be fine since the conversion is well-defined and doesn't lose any information.
I've heard that some platforms define macros in <inttypes.h>
that you can insert into the format string literal but I don't see that header on my Windows C++ compiler, which implies it may not be cross-platform.