This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: "format not a string literal"
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: "format not a string literal"
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 14 Oct 1999 00:56:25 -0600
- cc: Ken Raeburn <raeburn at raeburn dot org>, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, aj at suse dot de, egcs-patches at egcs dot cygnus dot com, gcc-bugs at sourceware dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <m3puyi1lxs.fsf@localhost.localnet>you write:
> > Otherwise, we should probably make sure that people know that -Wformat
> > is useless when GNU gettext is involved.
>
> It's not useless because a) if you compile without optimization you'll
> get the warnings and b) this expression will change. It predates any
> gcc support.
>
> But this does not change the fact that now with this change flawless
> code produces tons of warnings. Unjustified.
I think we're going to need a switch to control this warning since there are
significant cases where we're going to get false positives.
jeff
ps. However, I would not necessarily call the warning "unjustified"; it is
doing precisely what we expect -- it's telling you that it was unable to
check the format strings for those functions.