comp.lang.ada
 help / color / mirror / Atom feed
From: evans@evans.pgh.pa.us (Arthur Evans Jr)
Subject: null pointer representation (was: Boolean Representation)
Date: 1998/09/27
Date: 1998-09-27T00:00:00+00:00	[thread overview]
Message-ID: <evans-2709981430360001@ppp23.s9.pgh.net> (raw)
In-Reply-To: yec1zoyd2xa.fsf@king.cts.com

In article <yec1zoyd2xa.fsf@king.cts.com>,
Keith Thompson <kst@king.cts.com> wrote:

> Nor can we assume that a ... null pointer is represented as all-bits-zero

Indeed not.  Some years ago I was concerned about this very issue and
asked around (probably on cla) about it.  The answers were instructive.
Most compilers did in fact use all zeros, but some other values were
used, including one compiler (from IBM, I think) that used the HEX
number DEAD BEEF.  I suppose it really stood out in HEX dumps.

Since I was interfacing to C-code in Ada-83 and code on the C side
needed zero for null pointers, I ended up writing some extra code to
ensure that value, even though the implementation I was then using
represented the null pointer as zero.

And then we never ported to another compiler, so that effort was wasted.
Well, them's the breaks.

Art Evans

Make the obvious fix to my address.




  parent reply	other threads:[~1998-09-27  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-24  0:00 Boolean Representation matthew_snyder
1998-09-24  0:00 ` dennison
1998-09-24  0:00   ` Keith Thompson
1998-09-25  0:00     ` dennison
1998-09-25  0:00       ` Keith Thompson
1998-09-26  0:00         ` Tucker Taft
1998-09-26  0:00           ` Keith Thompson
1998-09-27  0:00             ` dewarr
1998-09-27  0:00             ` Arthur Evans Jr [this message]
1998-09-27  0:00               ` null pointer representation (was: Boolean Representation) Keith Thompson
1998-09-28  0:00               ` dewarr
1998-09-28  0:00                 ` Lieven Marchand
1998-09-28  0:00                 ` Keith Thompson
1998-09-28  0:00                   ` dewarr
1998-09-30  0:00                     ` Keith Thompson
1998-10-02  0:00                       ` Robert I. Eachus
1998-09-27  0:00           ` Boolean Representation dewarr
1998-09-24  0:00 ` dewarr
1998-09-24  0:00   ` Samuel T. Harris
1998-09-25  0:00     ` dewarr
1998-09-27  0:00       ` Samuel T. Harris
1998-09-28  0:00         ` dewar
1998-09-24  0:00   ` matthew_snyder
1998-09-24  0:00     ` Tom Moran
1998-09-25  0:00       ` dewarr
1998-09-25  0:00         ` Tom Moran
1998-09-24  0:00     ` dennison
1998-09-25  0:00     ` Robert I. Eachus
1998-09-25  0:00     ` dewarr
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox