[ACCEPTED]-How to use the GCC attribute 'format'?-printf
The documentation has the answer you need. Particularly:
- The one you have posted is correct (
format(printf, 1, 0)). 1 because the format string is parameter 1, 0 because there are no variadic arguments to be checked.
Take a look at the GCC docs on gnu.org. As for the last question, my 4 guess is that
MyPrintf is not a template function 3 and the only definition available takes 2
char const* as the first argument so it feels safe 1 making the suggestion.
More Related questions