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,ab36006a122bb868,start X-Google-Attributes: gid103376,public From: "Marc A. Criley" Subject: Overlay allowability Date: 2000/05/01 Message-ID: <390D94FB.D23390D4@lmco.com>#1/1 X-Deja-AN: 617856471 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.vf.lmco.com X-Trace: knight.vf.lmco.com 957190645 10149 166.17.131.243 (1 May 2000 14:17:25 GMT) Organization: Lockheed Martin M&DS Mime-Version: 1.0 NNTP-Posting-Date: 1 May 2000 14:17:25 GMT Newsgroups: comp.lang.ada Date: 2000-05-01T14:17:25+00:00 List-Id: A few times in my career I've encountered situations where two different representations of the same set of bits are desired in a high performance application, and this has been effected with the aid of the 'Address representation attribute. In Ada 95, an example of this would be: N : Natural; SN : Stream_Element_Array(1..N'Size / System.Storage_Unit); for SN'Address use N; This has always struck me as somewhat iffy, but I confess I've used it as well on a couple occasions with Ada 83. I've always found that it works as one intuitively expects, so long as all alignment, layout and sizing aspects are fully thought through and accommodated. So, is this within the definition of Ada 95? Or is it well-defined only for certain constructs, say scalars and non-tagged types, and dicey for others? Are there type constructs for which relying on it is clearly a reliance on undefined behavior, is the whole construct a reliance on undefined behavior? Is there a de facto, in place of a formal, expectation that this should work as expected? Marc A. Criley