what is “__printflike__ modifier” exactly? what does this term mean?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
At a guess it tells the compiler you’re using that a function takes arguments in the form
[anything, ] format, ...where theformat, ...part look like the arguments toprintf. The__printflike__attribute lets the compiler test the types in the argument list against the string format. This comes up when you write a function likelog(format, ...)and usevsprintfto subordinate the formatting work to the usual standard library functions before sending the string to some special log interface.If you are using GCC then it is probably a
#definein your project something like:Where
1, 2means thatformat, ...appear in positions 1 and 2.