This is the mail archive of the gcc-patches@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] |
Other format: | [Raw text] |
Hi,
On Fri, 29 Apr 2005, Joseph S. Myers wrote:
One possibility in that regard is for it to go in -Wformat=2 alongside
-Wformat-nonliteral -Wformat-security -Wformat-y2k. Though unlike
--Wformat-nonliteral -Wformat-y2k which are cases where the warning can
be difficult to avoid (if your code needs to build up a format string,
or if you know you do want a particular strftime format) so indicating
it doesn't belong in -Wall, here the warning can always be avoided by
adding a cast at each call site (with no change to the code generated).
This indicates that you never had to deal with more than a couple sources,
whose initial author is long dead ;-)
portability, well, there's -pedantic. Let's keep -Wall usable and not force people to do "-W -Wall -Wno-not-this-one -Wno-thats-dumb-too -Wno-cant-break-anything" to get at the usefull warnings.
A criteria for usefull warnings _to me_ (I fully realize that's not the
opinion of all), is "can it change code harmfully depending on the
architecture or circumstances, when compiled on a GNU system".
-- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com (916) 791-8304
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |