4 ms·
GCC does catch problems with printf arguments vs the format string and it has mechanisms for defining functions that take the same format strings. I operate at
by cardiffspaceman 9y ago
GCC does catch problems with printf arguments vs the format string and it has mechanisms for defining functions that take the same format strings. I operate at a high enough warning level that I see this type of warning now and then.
TL;DR: the compiler DOES have that special logic.
- rifung 9y agoAh interesting to know that GCC does this! I figured there would be compilers which did this but I sadly didn't have any examples. > the compiler DOES have that special logic. Indeed it being a controversial decision does not imply that no compilers would do it; if anything it implies that there should be some compilers which make that choice.