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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9ae4660d46953150 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-24 21:40:14 PST Path: supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!skynet.be!portc01.blue.aol.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Enhancement needed Date: Mon, 25 Sep 2000 04:26:16 GMT Organization: Deja.com - Before you buy. Message-ID: <8qmk4l$bb2$1@nnrp1.deja.com> References: <0$9CsHAKbiv5Ewg1@ntlworld.com> <8pol3q$dnqb3$1@ID-25716.news.cis.dfn.de> <39C5530F.B7849F7A@Raytheon.com> <39C564E4.C976F096@telepath.com> NNTP-Posting-Host: 205.232.38.240 X-Article-Creation-Date: Mon Sep 25 04:26:16 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) X-Http-Proxy: 1.0 x57.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:787 Date: 2000-09-25T04:26:16+00:00 List-Id: In article <39C564E4.C976F096@telepath.com>, Ted Dennison wrote: > I believe the entire issue was what the compiler can do in the > *absence* of a rep clause. Its pretty clear that it needs to > honor any record rep clause, or die trying. But it was > suprising to some that in *absense* of a rep clause, > compilers still aren't supposed to rearrange record fields to > make a size clause attainable. Well the RM is a good antidote to suprise here. Once again, the relevant section of the RM is 13.3(53): 53 A Size clause on a composite subtype should not affect the internal layout of components. This is implementation advice, since there is no easy way to formalize this as a formal semantic requirement, because the formal semantics have nothing to say about default data representation (for example a compiler that rearranged record fields only in leap years is a conforming, though silly, compiler -- IA is basically about preventing silliness :-) In this case, the IA is well taken, because if size could affect the internal layout of components, this could result in expensive implicit conversions. At the very least, compilers that follow implementation advice in the RM should not surprise you by following this advice :-) Sent via Deja.com http://www.deja.com/ Before you buy.