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,2203a21a136b39cc X-Google-Attributes: gid103376,public From: sampson@nosc.mil (Charles H. Sampson) Subject: Re: Fortran's Equivalence Date: 1997/04/01 Message-ID: <1997Apr1.170552.24429@nosc.mil>#1/1 X-Deja-AN: 229926181 Sender: news@nosc.mil References: <333840D1.7B12@cae.ca> <1997Mar28.170935.19124@nosc.mil> Organization: Computer Sciences Corporation Newsgroups: comp.lang.ada Date: 1997-04-01T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >In article <1997Mar28.170935.19124@nosc.mil>, sampson@nosc.mil (me) wrote: > >> Unchecked_conversion should be used when you absolutely have to and >>avoided in all other circumstances. It is definitely not portable. > >What is non-portable about using Unchecked_Conversion to convert an integer >to a record? The only time you have a portability problem with UC is when >the target type is unconstrained. Since the target type is constrained, >and can be specified using a portable representation clause, using UC >seems like the most sensible thing to do. Whoops! I've got at least a moderate amount of egg on my face! As well as I can tell, this particular use of Unchecked_Conversion is now 100% portable. (I was thinking with a 12-year old mindset. More about that in another post.) Of course, in general Unchecked_Conversion is not portable. However, one point of this part of my response was to encourage the use of Unchecked_Conversion when it's the right thing to do. I didn't want to look like one of those people who say that it is evil and should be avoided at all times. Charlie