[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 0 vs. NULL
From: |
Paul Eggert |
Subject: |
Re: 0 vs. NULL |
Date: |
Mon, 15 Oct 2007 14:30:27 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Compilers such as Sun C++ really define NULL to 0
> (in both C and C++ mode!), and misinterpret NULL in varargs and sizeof.
The problem with varargs is one that has bitten me personally. Ouch!
But "sizeof (NULL)" is a new one on me. As near as I can make out,
that expression can yield any nonnegative value, as far as the C
standard is concerned. I'd be mildly surprised to find any useful,
portable code that contains "sizeof (NULL)"; normally I would think
"bug" if I saw such an expression.
This is a trivial point by itself, but I'm raising it since I'm a bit
worried that I am missing something nontrivial here.
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, (continued)
- 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 <=
- 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