[ACCEPTED]-How to use the GCC attribute 'format'?-printf
Accepted answer
The documentation has the answer you need. Particularly:
- Yes
- 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.
0
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.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.