This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: "format not a string literal"
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: "format not a string literal"
- From: Gavin Romig-Koch <gavin at cygnus dot com>
- Date: Thu, 14 Oct 1999 15:17:07 -0400 (EDT)
- CC: <gcc-patches at gcc dot gnu dot org>
- References: <199910141402.KAA21437@caip.rutgers.edu>
Kaveh R. Ghazi writes:
> 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.
I'm not sure if this is what you intented, but if you ment that
-Wformat (by itself) would turn on the new warnings and that
-Wformat -Wall (together) would turn them off ... well I _really_
rather not have -Wall (appear) to turn off warnings.
I would rather not do it this way, and instead have a -Wformat-all
option that displays both warnings in question.
There may be makefiles that already use -Wformat that don't use -Wall,
and don't want the new warnings. We should go screwing these makefiles
when all it takes to not screw them is a new -W flag.
I think a new flag that turns on both the old -Wformat warnings
and the new ones would be better. I like "-Wformat-all" better than
"-Wformat-full" or "-Wformat-nonliteral", but I don't feel strongly
about the spelling.
-gavin...