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, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: "format not a string literal"
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Thu, 14 Oct 1999 18:41:04 -0400
- Cc: drepper at cygnus dot com, aj at suse dot de, egcs-patches at egcs dot cygnus dot com, gcc-bugs at sourceware dot cygnus dot com, raeburn at raeburn dot org
- References: <199910141402.KAA21437@caip.rutgers.edu> <31880.939923711@upchuck.cygnus.com>
On Thu, Oct 14, 1999 at 11:55:11AM -0600, Jeffrey A Law wrote:
> In message <199910141402.KAA21437@caip.rutgers.edu>you write:
> > Perhaps we leave off this behavior when invoked through -Wall but turn
> > it on when invoked through -Wformat? I.e. we could set the variable
> > `warn_format' to either 1 or 2 like we do for other warnings and test
> > for == 2 before showing the "not a string literal" message.
> That would be fine with me.
I couldn't find the original message Jeff was replying to so I could reply to
that. I really hope we would start using enums for multistate switches, and
not magic values, ie:
enum format_warnings
{
FORMAT_WARN_NONE,
FORMAT_WARN,
FORMAT_WARN_NONLITERAL
};
extern enum format_warnings warn_format;
--
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