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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!r28g2000prb.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Fri, 22 Jul 2011 07:54:54 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0bbabc10-c546-4ece-a3a1-deb9ec94f9fc@r28g2000prb.googlegroups.com> References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> <25df2c14-349d-4ac1-8f02-01ab76df041a@r28g2000prb.googlegroups.com> NNTP-Posting-Host: 207.200.116.71 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311346494 15182 127.0.0.1 (22 Jul 2011 14:54:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 22 Jul 2011 14:54:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r28g2000prb.googlegroups.com; posting-host=207.200.116.71; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-Via: HTTP/1.1 (Velocity/3.1.2.1 [uScMs f p eN:t cCMp s ]), HTTP/1.1 spider-ntc-tc11.proxy.aol.com[CFC8704B] (Prism/1.2.1), HTTP/1.1 cache-ntc-ab07.proxy.aol.com[CFC87447] (Traffic-Server/6.1.5 [uScM]) X-Google-Web-Client: true X-Google-Header-Order: ARLUECVH X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.5401; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPDTDF; BRI/1; .NET4.0C; BRI/2; AskTbARS/5.12.1.16460),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20298 Date: 2011-07-22T07:54:54-07:00 List-Id: On Jul 22, 3:16=A0am, Brian Drummond wrote: > On Thu, 21 Jul 2011 14:54:35 -0700, Adam Beneschan wrote: > > On Jul 21, 2:30=A0pm, Brian Drummond wrote: > > >> Seems that this implies that either (a: unlikely) the variable-sized > >> component MUST remain in place in the record (which makes resizing it > >> all but impossible) or (b: would work) the record must contain an > >> ACCESS to it (in which case the implementation silently does something > >> other than the declaration says). > > > (b) is pretty much how this would be implemented. =A0With regard to you= r > > comment "the implementation silently does something other than the > > declaration says": =A0the implication, [...] isn't warranted. =A0If the= re =A0 > > are no representation items, then a declaration says *nothing* about > > how a type is represented. > > Thank you for the correction. > ... the implementation silently does something other than I wrongly > inferred from the declaration. > I can live with that! > > I considered adding a comment that this would make representation clauses > difficult, as you suggest. > > On the one hand, I would find it difficult to think of a practical use > for a representation clause for this object ... on the other, unless > aliasing this monster is specifically prohibited, there appears to be > room for nasty corner cases. Is there such a rule? Bob and I discussed this a little, above. There's no rule against aliasing the whole record, but that shouldn't pose a problem. As for aliasing just the dynamic array component, you can declare it "aliased", but you can't do anything that would actually result in aliasing (like use X.Name'Access) unless it is known that Name's size can't change (which means that the compiler has to make sure the pointer doesn't change either). So I think the rules are sufficient to avoid problems. -- Adam