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-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Thu, 21 Jul 2011 21:30:50 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 21 Jul 2011 21:30:50 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="t4cb7N24pei7wVW7iCONQQ"; logging-data="22352"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/435iaHTCTRvg40jlTVGRGmQpqKuHln18=" User-Agent: Pan/0.134 (Wait for Me; GIT cb32159 master) Cancel-Lock: sha1:oOtqeJPAcmSNbpFogcxP8L4sp4Y= Xref: g2news1.google.com comp.lang.ada:20283 Date: 2011-07-21T21:30:50+00:00 List-Id: On Thu, 21 Jul 2011 10:40:38 -0700, Jeffrey Carter wrote: > On 07/21/2011 02:50 AM, Brian Drummond wrote: >> >> Interesting. Do you mean they allocate a new object? Then how do they >> handle the following declarations >> X : aliased Warned_Person; >> Y : access Warned_Person := X'access; >> when X.Name is resized? > > I should have said such compilers change the space for the > variable-sized components, not the space for the entire object, so X > remains in a constant position. I'm not a compiler writer so I'm not > entirely sure what's involved in implementing such an approach. > 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). Either way has surprises : if the actual result is (c: Dmitry option 3) the prohibition of aliasing for e.g. records with default discriminants, I would not lose any sleep and probably be relieved... - Brian