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]

Re: [C++ patch] accept __null as sentinel


On Fri, 29 Apr 2005, Richard Henderson wrote:

> FWIW, Michael, I agree that allowing NULL (and thus __null) to be used
> as a valid sentinal is the only way this will practically be useful to
> real code.

I think OpenBSD is real code.  Diagnosing the use of NULL as a sentinel is 
also what's desired for OpenBSD; they may be on the stricter side but this 
is through concerns for genuine rather than merely theoretical portability 
and security.  See Marc Espie's comments in the thread 
<http://gcc.gnu.org/ml/gcc-patches/2004-09/subjects.html#01417> for (a) 
the desire for this warning for uncast NULL and (b) examples of real 
deployed systems where NULL for C++ is plain 0 unconditionally showing 
there to be genuine portability issues involved.

-- 
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)


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