From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26034 invoked by alias); 24 Oct 2005 10:33:24 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 25944 invoked by uid 22791); 24 Oct 2005 10:33:19 -0000 Received: from iona.dcs.st-and.ac.uk (HELO iona.dcs.st-and.ac.uk) (138.251.206.55) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 24 Oct 2005 10:33:19 +0000 Received: from [138.251.209.145] ([138.251.209.145]) by iona.dcs.st-and.ac.uk (8.12.10/8.12.10) with ESMTP id j9OAXDi8007523; Mon, 24 Oct 2005 11:33:13 +0100 Message-ID: <435CB869.5060005@bubblescope.net> Date: Mon, 24 Oct 2005 10:33:00 -0000 From: random@bubblescope.net User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) MIME-Version: 1.0 To: "Alex J. Dam" CC: GCC-Help Subject: Re: Moving to AMD64 bit and porting issues References: <1129958772.5288.22.camel@lion> <20051024102542.GA3154@hymen> In-Reply-To: <20051024102542.GA3154@hymen> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-10/txt/msg00151.txt.bz2 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