comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Alternate to Unchecked_Conversion - Portable?
Date: 1999/02/21
Date: 1999-02-21T00:00:00+00:00	[thread overview]
Message-ID: <m3d833e5vr.fsf@mheaney.ni.net> (raw)
In-Reply-To: 36d05e39.0@news.pacifier.com

"Steve Doiel" <nospam_steved@pacifier.com> writes:

> I discovered a technique for performing a similar function to
> Unchecked_Conversion.  Locating two data structures at the same address by
> defining the first normally and then using an address clause to locate the
> second at the same address as the first (as shown in the following sample):

<example snipped>

> My question is: is this portable?
> 
> I expect that record layouts will be dependent on different endian machines,
> and I know that this technique is inherently unsafe, but it makes things
> very simple.

Don't use address overlays unless you have a compelling reason to do
so.  Use Unchecked_Conversion, which is also "very simple."












  parent reply	other threads:[~1999-02-21  0:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-21  0:00 Alternate to Unchecked_Conversion - Portable? Steve Doiel
1999-02-21  0:00 ` Steve Quinlan
1999-02-22  0:00   ` robert_dewar
1999-02-21  0:00 ` Matthew Heaney [this message]
1999-02-22  0:00 ` robert_dewar
1999-02-22  0:00   ` Samuel Mize
1999-02-22  0:00 ` Christopher Green
1999-02-23  0:00   ` Matthew Heaney
1999-02-23  0:00     ` Samuel Mize
1999-02-24  0:00     ` robert_dewar
1999-02-25  0:00       ` Nick Roberts
1999-02-25  0:00         ` robert_dewar
1999-02-26  0:00           ` Nick Roberts
1999-02-26  0:00             ` Matthew Heaney
1999-02-27  0:00               ` Nick Roberts
1999-02-24  0:00   ` robert_dewar
1999-02-23  0:00     ` Christopher Green
1999-02-25  0:00       ` robert_dewar
1999-02-24  0:00         ` Christopher Green
1999-02-25  0:00           ` robert_dewar
1999-02-26  0:00             ` Dale Stanbrough
1999-02-26  0:00               ` Robert A Duff
1999-02-23  0:00     ` Christopher Green
1999-02-25  0:00       ` robert_dewar
1999-02-24  0:00         ` Christopher Green
1999-02-25  0:00           ` robert_dewar
1999-02-25  0:00             ` dennison
1999-02-25  0:00               ` Christopher Green
1999-02-26  0:00                 ` robert_dewar
1999-02-26  0:00                   ` Christopher Green
1999-03-01  0:00                     ` Nick Roberts
1999-03-01  0:00                       ` dewar
1999-03-01  0:00                         ` Nick Roberts
1999-02-26  0:00                 ` Tom Moran
1999-02-26  0:00                   ` robert_dewar
1999-02-26  0:00             ` Robert A Duff
1999-02-28  0:00               ` robert_dewar
1999-02-22  0:00 ` Tom Moran
replies disabled

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