This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/1027] slightly misleading printf format warning
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jun 2004 15:37:36 -0000
- Subject: [Bug c/1027] slightly misleading printf format warning
- References: <20001209174601.1027.cwitty@newtonlabs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-06-01 15:37 -------
Subject: Re: slightly misleading printf format warning
On Tue, 1 Jun 2004, bangerth at dealii dot org wrote:
> I also find the message overly terse. The abbreviated form "arg" for
> argument sounds too much like an unquoted reference to a variable.
> Why can't we speak English as in most other messages, for example
> "The format contains a char*, but argument 2 is a float."
> ?
How about something like
warning: format '%s' expects a char *, but argument 2 has type float *
(i.e., giving the particular format with bad argument type)?
The %T format isn't yet hooked up to the pretty-printer code for printing
types, once it is then improving these warnings will be straighforward.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1027