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: a07f3367d7,5d4ade2fd8fd67c6 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!a2g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Thu, 21 Jul 2011 13:12:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> <3e8384ce-e18a-4d84-95d7-f4eb750b16c9@u6g2000prc.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311279121 15007 127.0.0.1 (21 Jul 2011 20:12:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jul 2011 20:12:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a2g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20281 Date: 2011-07-21T13:12:00-07:00 List-Id: On Jul 21, 8:41=A0am, Robert A Duff wrote: > Adam Beneschan writes: > > You don't have to allocate a whole new Warned_Person, just a new Name. > > Right. =A0If you allocate a whole new Warned_Person, you can get > dangling pointers and dangling renamings. =A0If I remember correctly, > the rules prevent renaming or 'Access of parts of Name (assuming > it has aliased parts). 3.10.2(26), 8.5.1(5). However, I think the language now says that 'Access and rename of a component are OK if the discriminated object is known to be constrained; that means that the implementation has to be smart enough to know that it can't allocate a new Name in that case (when the entire record is assigned) but keep the same pointer and just copy over the data that it points to. -- Adam