This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: "format not a string literal"


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]