From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7532bb41d4ac458d X-Google-Attributes: gid103376,public From: claveman@inetworld.net (Charles H. Sampson) Subject: Re: Questions about Unchecked_Conversion Date: 1999/12/18 Message-ID: <1e2zzb2.eau06c175dd5oN%claveman@inetworld.net>#1/1 X-Deja-AN: 562337997 References: <19991215201559.23735.qmail@web218.mail.yahoo.com> <1e2w3op.j44mmjevrxz4N%claveman@inetworld.net> <38593212_2@news1.prserv.net> X-Trace: newsfeed.slurp.net 945530536 209.132.125.175 (Sat, 18 Dec 1999 09:22:16 CDT) User-Agent: MacSOUP/2.4.2 NNTP-Posting-Date: Sat, 18 Dec 1999 09:22:16 CDT Newsgroups: comp.lang.ada Date: 1999-12-18T00:00:00+00:00 List-Id: Matthew Heaney 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.