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,57f8540942f8e060 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!a5g2000yqi.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Initialization and Finalization of limited object "returned" by a function Date: Thu, 11 Feb 2010 14:49:48 -0800 (PST) Organization: http://groups.google.com Message-ID: <2801be3a-afd6-4d14-ad7f-feb23a511f02@a5g2000yqi.googlegroups.com> References: <75a9f860-ad3c-49a0-b2a1-a8f1386e6ff6@x10g2000prk.googlegroups.com> NNTP-Posting-Host: 77.198.58.225 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265928588 24075 127.0.0.1 (11 Feb 2010 22:49:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 11 Feb 2010 22:49:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a5g2000yqi.googlegroups.com; posting-host=77.198.58.225; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9119 Date: 2010-02-11T14:49:48-08:00 List-Id: On 11 f=E9v, 22:51, Adam Beneschan wrote: > For an extended return, > > =A0 =A0return R : T; > > R is not a local variable, and it isn't "assigned" into the anonymous > object; thus, there's no Adjust, and R is not finalized when the > function returns Yes > (but the anonymous object will be finalized later, Which anonymous object ? > except when it mutates into some other object). Ouch, requires clarifications (at least to me) > I think that's the > point of the nasty language in 3.10.2(10.1). Do you suggest the behavior I'm experiencing is the expected one ? (being nasty or not) > Which is another way of > saying that R is a name for the result (as you said), What I was expecting, indeed > not a distinct > object that gets copied to the result. I hope so : it's limited ! > I thought it would be helpful > to point it out---not to you, but to other readers. =A0It's hardly a > trivial difference, and it's an important one to understand when > adjusts and finalizations are involved. =A0Anyway, I hope this helps > someone. Probably I'm one of the "other readers" Well, I will later drive another experiment, a shorter one, as Robert/ Bob suggested the example source I gave was a bit too long to be quickly studied.