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: law at cygnus dot com, Eli Zaretskii <eliz at gnu dot org>
- Subject: Re: "format not a string literal"
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Thu, 14 Oct 1999 18:34:25 -0400
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, drepper at cygnus dot com, egcs-patches at egcs dot cygnus dot com, gcc-bugs at sourceware dot cygnus dot com
- References: <199910141718.NAA24590@mescaline.gnu.org> <31616.939921958@upchuck.cygnus.com>
On Thu, Oct 14, 1999 at 11:25:58AM -0600, Jeffrey A Law wrote:
> In message <199910141718.NAA24590@mescaline.gnu.org>you write:
> > However, I think that if a compiler cannot feasibly check the code, it
> > is not a reason good enough for it to issue a warning. Warnings should,
> > IMHO, be issued only when the compiler *can* analyze the code and the
> > analysis shows that it is buggy or dubious.
> In that case you might as well throw away the code for uninitialized variables,
> unreachable code, and a variety of others.
>
> Most warnings are not and will not be 100% accurate. You are free to ignore
> them if they're not of interest to you.
>
> As far as I'm concerned the new warning will stay, but we need an option to
> turn it off.
I would prefer the default for warning about non-constant format strings to be
off.
--
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482