This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Moving to AMD64 bit and porting issues
- From: random at bubblescope dot net
- To: "Alex J. Dam" <alexjdam at gmail dot com>
- Cc: GCC-Help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 24 Oct 2005 11:33:13 +0100
- Subject: Re: Moving to AMD64 bit and porting issues
- References: <1129958772.5288.22.camel@lion> <20051024102542.GA3154@hymen>
Alex J. Dam wrote:
>On Sat, Oct 22, 2005 at 01:26:12AM -0400, Ernest L. Williams Jr. wrote:
>
>
>>Should we use "NULL" to represent a null pointer or "0" to represent a
>>null pointer?
>>
>>
>
>AFAIK, according to C++, they are equivalent. See, for example,
>
>http://www.research.att.com/~bs/bs_faq2.html#null
>
>
This is true, they are equivalent. I would still advise using NULL
myself, as then g++ will produce some (I feel) helpful warnings, for
example 'NULL==1' or 'NULL + 1' will both produce "warning: NULL used in
arithmetic".
Chris