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
Michael Matz wrote:
Maybe. But note that the case of a literal 0 will still be warned (as
also for 0L), no matter what. It's only __null, a GCC specific thing,
which I don't want to warn about, in a warning only implemented by GCC.
We _know_ using __null will work.
But the user (probably) didn't write "__null" -- they wrote "NULL". So,
what we really know is that using GCC's <stddef.h> will work. But if
you're trying to write code portable to non-GCC compilers, then the
warning still has value for you.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304