public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: random@bubblescope.net
To: "Alex J. Dam" <alexjdam@gmail.com>
Cc: GCC-Help <gcc-help@gcc.gnu.org>
Subject: Re: Moving to AMD64 bit and porting issues
Date: Mon, 24 Oct 2005 10:33:00 -0000	[thread overview]
Message-ID: <435CB869.5060005@bubblescope.net> (raw)
In-Reply-To: <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

  reply	other threads:[~2005-10-24 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-22  5:26 Ernest L. Williams Jr.
2005-10-24 10:24 ` Alex J. Dam
2005-10-24 10:33   ` random [this message]
2005-10-24 10:37   ` Ernest L. Williams Jr.
2005-10-24 19:02     ` Ian Lance Taylor
2005-11-04 11:54       ` Segher Boessenkool
2005-11-04 12:05         ` Ernest L. Williams Jr.
2005-11-04 12:35           ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=435CB869.5060005@bubblescope.net \
    --to=random@bubblescope.net \
    --cc=alexjdam@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).