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,344faf475a6f812a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.36.66 with SMTP id s2mr18226316qad.6.1367599793092; Fri, 03 May 2013 09:49:53 -0700 (PDT) X-Received: by 10.50.101.39 with SMTP id fd7mr401019igb.16.1367599793047; Fri, 03 May 2013 09:49:53 -0700 (PDT) Path: y6ni0qax.0!nntp.google.com!m7no751064qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 3 May 2013 09:49:52 -0700 (PDT) In-Reply-To: <48bce335-3651-48a1-8a7e-01a140b27748@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <97967083-d21d-4de2-aeb8-76d0d5818993@googlegroups.com> <03e84773-d616-4a46-8189-93ae4ab5fcbf@googlegroups.com> <48bce335-3651-48a1-8a7e-01a140b27748@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1de70963-c14b-4316-a2a4-ab32f50434ab@googlegroups.com> Subject: Re: Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns. From: Adam Beneschan Injection-Date: Fri, 03 May 2013 16:49:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-05-03T09:49:52-07:00 List-Id: On Thursday, May 2, 2013 11:43:16 PM UTC-7, egilhh wrote: > On Friday, May 3, 2013 3:11:35 AM UTC+2, Adam Beneschan wrote: >=20 > > >=20 >=20 > > Based on what I now understand, I think Shark8's original example is mi= sbehaving. 6.5(5.3) says that the accessibility level of an anonymous-acce= ss in an extended return statement is the same as the accessibility level o= f the function result; and since this seems to determine what masters the a= llocated tasks depend on, the master for the task allocated by Make_ER shou= ld be the same as the one in Make_NR and (I think) for Make_EF. So it's a = compiler bug that they're behaving differently. >=20 >=20 > But 6.5(5.11/3) says that for extended return, a new nominal subtype is c= reated > for the return object, which seems to be different from the function resu= lt > subtype. The "subtype" here isn't relevant. The *type* is different only because it= 's an anonymous access type, and each appearance of an anonymous access typ= e creates a new type. But objects of anonymous access types tend to conver= t from one to another implicitly, so that isn't really relevant either. Th= e important thing seems to be what the accessibility levels of the types ar= e, and 6.5(5.3) is what makes the big difference here. =20 > But then, 6.5(7/2): "If the return object has any parts that are tasks, t= he activation of those tasks does not occur until after the function return= s" The return object is of an access type, so it doesn't have any task parts. = The thing that the access type *points* to isn't the return object. =20 -- Adam