comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns.
Date: Fri, 3 May 2013 09:49:52 -0700 (PDT)
Date: 2013-05-03T09:49:52-07:00	[thread overview]
Message-ID: <1de70963-c14b-4316-a2a4-ab32f50434ab@googlegroups.com> (raw)
In-Reply-To: <48bce335-3651-48a1-8a7e-01a140b27748@googlegroups.com>

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:
> 
> > > 
> 
> > Based on what I now understand, I think Shark8's original example is misbehaving.  6.5(5.3) says that the accessibility level of an anonymous-access in an extended return statement is the same as the accessibility level of the function result; and since this seems to determine what masters the allocated tasks depend on, the master for the task allocated by Make_ER should 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.
> 
> 
> But 6.5(5.11/3) says that for extended return, a new nominal subtype is created
> for the return object, which seems to be different from the function result
> 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 type creates a new type.  But objects of anonymous access types tend to convert from one to another implicitly, so that isn't really relevant either.  The important thing seems to be what the accessibility levels of the types are, and 6.5(5.3) is what makes the big difference here.

 
> But then, 6.5(7/2): "If the return object has any parts that are tasks, the activation of those tasks does not occur until after the function returns"

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.  

                         -- Adam



  reply	other threads:[~2013-05-03 16:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 18:27 Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns Shark8
2013-04-22 19:13 ` Dmitry A. Kazakov
2013-04-22 20:11   ` Shark8
2013-04-23  6:15     ` Simon Wright
2013-04-23  7:35     ` Stephen Leake
2013-04-23  8:58     ` Dmitry A. Kazakov
2013-05-02  2:20     ` Randy Brukardt
2013-05-02  4:41       ` Shark8
2013-04-23  6:32 ` egilhh
2013-04-23 15:24   ` Adam Beneschan
2013-04-24  5:56     ` egilhh
2013-04-24 14:40       ` Adam Beneschan
2013-04-25  5:30         ` egilhh
2013-04-25  5:41           ` Shark8
2013-04-23 16:00 ` Adam Beneschan
2013-04-23 16:52   ` Simon Wright
2013-04-23 17:57     ` Adam Beneschan
2013-04-25  8:48       ` egilhh
2013-04-25 15:19         ` Adam Beneschan
2013-05-02  2:33         ` Randy Brukardt
2013-05-02  2:38       ` Randy Brukardt
2013-05-02 16:15         ` Adam Beneschan
2013-05-02 22:00           ` Randy Brukardt
2013-05-03  1:11         ` Adam Beneschan
2013-05-03  5:34           ` Simon Wright
2013-05-03  6:43           ` egilhh
2013-05-03 16:49             ` Adam Beneschan [this message]
2013-05-03 23:09           ` Randy Brukardt
2013-04-23 23:00     ` Shark8
2013-04-23 23:16       ` Adam Beneschan
2013-05-02  2:28   ` Randy Brukardt
2013-05-02 16:37     ` Adam Beneschan
2013-04-23 16:33 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox