https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65446
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-06-09 CC| |manu at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Ricardo Nabinger Sanchez from comment #5) > In short: please warn. Some cases will generate unexpected results (which > are not compilation errors), simply because the programmer used an incorrect > format specifier. I think there is no doubt that we want to warn in cases that lead to different output (%u + short) or UB and avoid warning in cases that do not have any effect (%u + unsigned short). The question is how and who will implement these heuristics: https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps You are welcome to try. All the relevant code is in https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c-family/c-format.c;h=c19c411d61a44773c55c8686802787ec7e4c40a4;hb=HEAD