Boost logo

Boost :

From: Toon Knapen (toon_at_[hidden])
Date: 2001-06-13 10:59:23


> I disagree. "int *p = 0" is, and has been, the recommended way of
> dealing with null pointers in C++ since several years, and I find it
> easily to understand, easier than parsing "NULL". That's certainly
> a matter of personal taste.
>
(I have not seen this mentioned on the list before so here goes)

I would like to point you to following good info about porting to 64bit
:
http://www.tru64unix.compaq.com/linux/compaq_cxx/docs/uguport.htm#index_x_227

stating that "Using a 0 where you should use NULL generates a 32-bit
constant. On Alpha systems, this could yield 0 in the low 32 bits and
useless data in the high 32 bits when passed into a function that
accepts a variable number of arguments. Using NULL from the <stdio.h>
header file provides the correct value. "

In 32bit everything works out fine whereas it does not when sizeof(T*)
!= sizeof(int)

toon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk