[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdenetwork/ktalkd/ktalkd
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2003-01-15 10:42:34
[Download RAW message or body]

On Tuesday 14 of January 2003 20:30, Zack Rusin wrote:
> On Tuesday 14 January 2003 14:17, Lubos Lunak wrote:
> > On Tuesday 14 of January 2003 20:11, Zack Rusin wrote:
> > > On Tuesday 14 January 2003 12:28, Marc Espie wrote:
> > > > CVS commit by espie:
> > > >
> > > > in C++, NULL is guaranteed to be a null pointer. Not so for 0,
> > > > especially in varargs context. Will fix some 64 bits arches.
> > >
> > > Nope it's the other way around. Please do not use NULL.
> >
> >  There's no good reason for telling other people not to use NULL.
>
> Well, the standard says :
> 14.10p1: A null pointer constant is an integral constant
> expression (5.19) rvalue of integer type that evaluates
> to zero...
> 18.1p4: The macro NULL is an implementation-defined
>  C++ null pointer constant in this International
>  Standard (4.10).
> 180) Possible definitions include 0 and 0L, but
>  not (void*)0.
>
> Since in C NULL is in many cases defined as (void*)0 what do you do? To
> me that seems like a good reason not to use it.

 That's C, not C++. Note that above it says (void*)0 is not allowed. But first 
of all, how about mentioning one of those many cases?

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic