Mail Archives: djgpp-workers/1998/03/24/11:04:45
On Tue, 24 Mar 1998, Salvador Eduardo Tropea (SET) wrote:
> But perhaps we must investigate if the __null have some advantage and:
>
> 1) Define NULL conditionally (no redefinition)
> 2) If not defined:
> a) Test the gcc version, if 2.8.0 define with __null
> b) if prior define with 0.
I think that the C header(s) which define NULL should do so only under
"#ifndef __cplusplus". It is safer to let C++ use its own definition
throughout, and leave C at its usual definition.
The only thing that bothers me is the case of a C++ code that calls a C
function and passes it NULL as one of its arguments. Can somebody check
what does the C function see in that case, and will it compare equal to
the C's notion of NULL?
- Raw text -