comp.lang.ada
 help / color / mirror / Atom feed
From: claveman@inetworld.net (Charles H. Sampson)
Subject: Re: Questions about Unchecked_Conversion
Date: 1999/12/18
Date: 1999-12-18T00:00:00+00:00	[thread overview]
Message-ID: <1e2zzb2.eau06c175dd5oN%claveman@inetworld.net> (raw)
In-Reply-To: 38593212_2@news1.prserv.net

Matthew Heaney <matthew_heaney@acm.org> wrote:

> In article <1e2w3op.j44mmjevrxz4N%claveman@inetworld.net> , 
> claveman@inetworld.net (Charles H. Sampson) wrote:
> 
> >      Notice also that this is highly hardware dependent.  Use with care.
> > However, don't avoid it because of this dependency when you really need
> > it.
> 
> No, UC is not "highly hardware dependent."  The semantics of UC are
> well-defined, and the conditions under which these semantics are
> guaranteed are listed in RM95 13.9 (5-11).

     The paragraphs you cite have reduced the number of compiler depen-
dencies on this subject that were in Ada 83, but hardware dependencies 
remain.  As another respondent has already pointed out, endianess comes
immediately to mind.

     Another is 13.9 (6): S'Size = Target'Size.  While that's not as 
much of an issue right now as it was in the past, with most machines 
byte-oriented (and very few compiler implementors), if you try to port 
code using UC from one architecture to a wildly different one, you'll 
likely have problems on this point.

     Nonetheless, my point remains: Because of these dependencies, make
sure that you really do need it, that there's not some reasonably effi-
cient hardware-independent and compiler-independent means for obtaining
the effect you want.  If you do need it, use it.  That's what it's there
for.

                                Charlie

-- 
     To get my correct email address, replace the "claveman" by
"csampson" in my fake (anti-spam) address.




      parent reply	other threads:[~1999-12-18  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-15  0:00 Questions about Unchecked_Conversion MaryAnn Atkinson
1999-12-15  0:00 ` Matthew Heaney
1999-12-15  0:00 ` reason67
1999-12-16  0:00 ` Charles H. Sampson
1999-12-16  0:00   ` Matthew Heaney
1999-12-17  0:00     ` reason67
1999-12-18  0:00     ` Charles H. Sampson [this message]
replies disabled

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