Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com, Andrew Cagney <cagney@redhat.com>,
	Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de>,
	Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFC/AIX] xm-aix4.h - Can we remove NULL re-define?
Date: Sun, 08 Aug 2004 14:00:00 -0000	[thread overview]
Message-ID: <411631EC.8050207@gnu.org> (raw)
In-Reply-To: <20040808045246.GE24160@gnat.com>

> config/xm-aix4.h contains the following definition:
> 
> | /* Brain death inherited from PC's pervades.  */
> | #undef NULL
> | #define NULL 0

I'd assume that the PC perversity was along the lines of either:
	-- NULL not defined
	-- #define NULL ((void *)0)
where PC is AIX running on an i386 (yea, right :-).

> Is this still needed? Where does this come from?
> 
> It looks pretty scary that a compiler would actually defined NULL
> as being non-zero. I have always heard that NULL is not garantied
> to be zero, but I've seen so much code kind of confusing NULL and
> zero that I thought nobody in their right mind would actually do
> otherwise...
> 
> If still necessary, can this be replaced by something like this in
> defs.h?
> 
>         #if (NULL != 0)
>         #undef NULL
>         #define NULL 0
>         #endif

So just delete it.

Andrew



      reply	other threads:[~2004-08-08 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08  4:52 Joel Brobecker
2004-08-08 14:00 ` Andrew Cagney [this message]

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=411631EC.8050207@gnu.org \
    --to=cagney@gnu.org \
    --cc=Peter.Schauer@regent.e-technik.tu-muenchen.de \
    --cc=brobecker@gnat.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /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