[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 0 vs. NULL (was: Test for getaddrinfo() broken on Tru64 UNIX 5.1)
From: |
Bruno Haible |
Subject: |
Re: 0 vs. NULL (was: Test for getaddrinfo() broken on Tru64 UNIX 5.1) |
Date: |
Sat, 13 Oct 2007 22:45:18 +0200 |
User-agent: |
KMail/1.5.4 |
Benoit SIGOURE wrote:
> In C++, `0' is the preferred way of expressing `NULL'.
In C++, 0 can be used instead of NULL everywhere except inside sizeof and
varargs argument lists.
But what is _preferred_, depends on your and your co-developers' habits.
People who also program in C prefer NULL because NULL does not have the
pitfalls with argument passing (that Simon mentioned) and in sizeof.
People who also program in Java or C# prefer NULL because in these languages
there is a strict distinction between pointers and integral values.
Bruno
- Test for getaddrinfo() broken on Tru64 UNIX 5.1, Albert Chin, 2007/10/10
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Bruno Haible, 2007/10/13
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Benoit SIGOURE, 2007/10/13
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Ben Pfaff, 2007/10/13
- Re: 0 vs. NULL (was: Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1), Bruno Haible, 2007/10/13
- Re: 0 vs. NULL, Micah Cowan, 2007/10/13
- Re: 0 vs. NULL, Bruno Haible, 2007/10/13
- Re: 0 vs. NULL, Paul Eggert, 2007/10/15
- Re: 0 vs. NULL, Micah Cowan, 2007/10/15
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Jim Meyering, 2007/10/13
Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Simon Josefsson, 2007/10/13
Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Albert Chin, 2007/10/14