bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1


From: Benoit SIGOURE
Subject: Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1
Date: Sat, 13 Oct 2007 22:12:14 +0200

On Oct 13, 2007, at 9:34 PM, Simon Josefsson wrote:

Bruno Haible <address@hidden> writes:

Benoit SIGOURE wrote:
4) Don't use 0 to designate null pointers. That doesn't sit well with
     C++ compilers.

s/C++/C/ right?

Actually, neither C nor C++ compilers cry when you use 0 for NULL. It's only
my personal preference.

On platforms where integers aren't the same size as pointers, things can
go wrong if 1) you pass 0 to a function that expects a pointer and no
function prototype was available during compilation, or 2) you pass it
to a function that takes a variable parameter list.  So it is a good
habit to use NULL for pointers.

/Simon

Yes, but this point stands for C compilers. In C++, `0' is the preferred way of expressing `NULL'. But since C++ compilers have nothing against `NULL', it's obviously a better choice in the context of gnulib.

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]