I was wondering how a function can trigger a compilation warning?
This occurred to me because when we supply the wrong format specifier in the first argument of printf (scanf) for the variable that maps to this type specifier and compile with gcc with the -Wall parameter, the compiler generates a warning.
Now printf and scanf regularly implement variational functions, as I understand it, and I donβt know how to check the value of a string at compile time, not to mention giving a warning if something does not match.
Can someone explain to me how I get a compiler warning?
c gcc printf scanf
user1635881
source share