Re: On NULL and 0

2007-03-13 Thread Tom Truscott
> Zero is completely acceptable for a null pointer constant in all > circumstances *except* when passing to a varargs function, which can go > badly wrong on platforms where the sizeof a pointer is larger than the > sizeof an int. This is a serious loophole on such platforms, since the com

Re: On NULL and 0

2007-03-13 Thread Paulo J. Matos
On 3/13/07, Dave Korn <[EMAIL PROTECTED]> wrote: On 13 March 2007 13:52, Paulo J. Matos wrote: > Hello, > > When programming, due to my journeys through C++ recently, I've been > using 0 instead of NULL. Strangely gcc compilation doesn't warn me > about it. Is it ok to do this? (So far, I had no

RE: On NULL and 0

2007-03-13 Thread Dave Korn
On 13 March 2007 13:52, Paulo J. Matos wrote: > Hello, > > When programming, due to my journeys through C++ recently, I've been > using 0 instead of NULL. Strangely gcc compilation doesn't warn me > about it. Is it ok to do this? (So far, I had no problems). Is there > anything I should be aware

On NULL and 0

2007-03-13 Thread Paulo J. Matos
Hello, When programming, due to my journeys through C++ recently, I've been using 0 instead of NULL. Strangely gcc compilation doesn't warn me about it. Is it ok to do this? (So far, I had no problems). Is there anything I should be aware when using 0 instead of NULL in gcc code? Cheers, -- Pau