-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Paul Eggert wrote:
> Bruno Haible <[EMAIL PROTECTED]> 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 p
Bruno Haible <[EMAIL PROTECTED]> 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 m
Micah Cowan wrote:
> it is not safe to assume that using NULL, addresses those
> argument-passing problems To be
> portable, it must be cast when passed as a vararg param.
Indeed! Good point. Compilers such as Sun C++ really define NULL to 0
(in both C and C++ mode!), and misinterpret NULL in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Bruno Haible wrote:
> Ben Pfaff wrote:
>> ISO C says that NULL can be defined as 0, without a cast to void
>> *, and it is always defined that way in C++.
>
> The latter statement is not true. ISO C++ 18.1.(3) says:
>
> "The macro NULL is an impl
Ben Pfaff wrote:
> ISO C says that NULL can be defined as 0, without a cast to void
> *, and it is always defined that way in C++.
The latter statement is not true. ISO C++ 18.1.(3) says:
"The macro NULL is an implementation-defined C++ null pointer constant
in this International Standard (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 becau