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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2153d570c2f03e29 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.72.97 with SMTP id c1mr84873pav.36.1355797612223; Mon, 17 Dec 2012 18:26:52 -0800 (PST) Received: by 10.50.34.167 with SMTP id a7mr229261igj.5.1355797612019; Mon, 17 Dec 2012 18:26:52 -0800 (PST) Path: s9ni50630pbb.0!nntp.google.com!kr7no9021701pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 17 Dec 2012 18:26:51 -0800 (PST) In-Reply-To: <1a56bd55-0e11-4a62-866f-51ebfcf01c88@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=114.145.116.180; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj NNTP-Posting-Host: 114.145.116.180 References: <7ad8ab3a-2a17-44d0-a64f-4cfb1288dc1c@googlegroups.com> <565c0f25-e620-4875-9248-2371a874d345@googlegroups.com> <1d71f931-42ff-45aa-8ad2-69cae4980917@googlegroups.com> <1a56bd55-0e11-4a62-866f-51ebfcf01c88@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9e0aa594-f136-4301-a942-5dee0ad2752b@googlegroups.com> Subject: Re: Question about library-level functions From: ytomino Injection-Date: Tue, 18 Dec 2012 02:26:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-12-17T18:26:51-08:00 List-Id: On Tuesday, December 18, 2012 4:49:41 AM UTC+9, Adam Beneschan wrote: > There were some rule changes in Ada 2012 in 3.10.2 and 7.6.1, and I haven= 't yet studied them all. But my initial reading is that since the anonymou= s access function result is converted to a named access type A, then the ob= ject that gets allocated should be finalized when A disappears, i.e. at the= end of the block that declares A. I could easily be wrong. >=20 >=20 >=20 > -- Adam I'm reading that you pointed, now. RM 3.10.2 (10.3/3) says "If the result is of an anonymous access type and i= s the operand of an explicit conversion, the master is that of the target t= ype of the conversion;". The rule is just applicable to this case. This sta= tement is added when Ada 2012. Or, In Ada 2005 RM, (10/2) says "The accessibility level of an aggregate or= the result of a function call (or equivalent use of an operator) that is u= sed (in its entirety) to directly initialize part of an object is that of t= he object being initialized. In other contexts, the accessibility level of = an aggregate or the result of a function call is that of the innermost mast= er that evaluates the aggregate or function call. ".=20 The innermost master or *function call* is probably in the block of type A. I came to be sure that my understanding was wrong and it's a bug of the com= piler. Thanks.