This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] accept __null as sentinel
On Fri, 29 Apr 2005, Mark Mitchell wrote:
> So, I think we should continue to warn for this use of __null -- but provide a
> -Wno-... flag to shut that up. I think having it be part of -W, but not
> -Wall, might make sense.
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).
(-Wformat-security is a case I implemented and wanted included in
-Wall/-Wformat but couldn't get consensus to put it there.)
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)