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: a07f3367d7,344faf475a6f812a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.58.77 with SMTP id f13mr26802591qah.7.1366879727793; Thu, 25 Apr 2013 01:48:47 -0700 (PDT) X-Received: by 10.49.119.99 with SMTP id kt3mr3474274qeb.22.1366879727755; Thu, 25 Apr 2013 01:48:47 -0700 (PDT) Path: ef9ni16888qab.0!nntp.google.com!gp5no6710260qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 25 Apr 2013 01:48:47 -0700 (PDT) In-Reply-To: <03e84773-d616-4a46-8189-93ae4ab5fcbf@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.71.180.107; posting-account=P68zsgoAAABKpXKMUuwuUZ_RfBk1kZfB NNTP-Posting-Host: 193.71.180.107 References: <97967083-d21d-4de2-aeb8-76d0d5818993@googlegroups.com> <03e84773-d616-4a46-8189-93ae4ab5fcbf@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns. From: egilhh Injection-Date: Thu, 25 Apr 2013 08:48:47 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-04-25T01:48:47-07:00 List-Id: On Tuesday, April 23, 2013 7:57:56 PM UTC+2, Adam Beneschan wrote: > On Tuesday, April 23, 2013 9:52:04 AM UTC-7, Simon Wright wrote: >=20 > =20 > I don't see a language reason for that. The tasks are all created with a= llocators, and the type of the allocator alone should determine what master= the tasks depend on--not a block declaring an array that contains the acce= ss objects. If it's true that the block doesn't exit until all the tasks c= reated by allocators have completed, then it's probably a GNAT bug. I'd ne= ed to study it more carefully to make sure, though. There may be some rele= vant language rules I'm missing, or something else I'm missing. >=20 I've been reading up on the accessibility rules (RM 3.10.2), and the rules for functions returning anonymous access types have changed from 2005 to 20= 12. In my understanding, 2012 now requires the block to wait: RM 3.10.2(10.1/3): "The accessibility level of the result of a function cal= l is that of the master of the function call, which is determined by the point o= f call as follows:" RM 3.10.2(10.2/3): "If the result is used (in its entirety) to directly initialize part of an object, the master is that of the object being initialized. In the case where the initialized object is a coextension (see below) that becomes a coextension of another object, the master is that of = the eventual object to which the coextension will be transferred." RM 3.10.2(10.7/3): "In the case of a call to a function whose result type is an anonymous access type, the accessibility level of the type of the res= ult of the function call is also determined by the point of call as described above"), whereas 2005 permitted the other behavior. (A language lawyer is needed to confirm this) --=20 ~egilhh