This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64955] RFE: have -Wformat suggest the correct format string to use
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Feb 2015 14:56:35 +0000
- Subject: [Bug c/64955] RFE: have -Wformat suggest the correct format string to use
- Auto-submitted: auto-generated
- References: <bug-64955-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64955
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem here is that usually there are more possibilities of fixing the
code, and so it is a question what to suggest, it might as well just annoy
users when it constantly suggests the opposite hint the user wants to take. In
some cases, it is desirable to change the format specifier, in others to change
the argument (cast it to something, ...), etc.