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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a2451b7782380d0,start X-Google-Attributes: gid103376,public From: adam@irvine.com Subject: Order of subcomponent finalization Date: 1999/03/16 Message-ID: <7cmcu3$o7g$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 455719921 X-Http-Proxy: 1.0 x14.dejanews.com:80 (Squid/1.1.22) for client 192.160.8.21 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Mar 16 19:54:49 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/3.0 (X11; I; Linux 2.0.34 i686) Date: 1999-03-16T00:00:00+00:00 List-Id: Suppose a record type and an object of that type are declared: procedure Subp is type Rectype is record Component_1 : Controlled_Type_1; Component_2 : Controlled_Type_2; end record; R : Rectype; begin ... end Subp; where Controlled_Type_1 and Controlled_Type_2 are controlled types (duh). According to 7.6(12), R.Component_1 and R.Component_2 are initialized in arbitrary order (since neither one has an access discriminant constrained by a per-object expression). But does the RM specify in which order the components are finalized when Subp exits? 7.6.1(9) says similarly that the components of a composite type are finalized in arbitrary order; but 7.6.1(11) says that objects created by declarations in a master (in this case Subp) are finalized in the reverse order of their creation, and 3.3(12) says that R.Component_1 and R.Component_2 are objects (although whether they count as "objects created by a declaration is unclear to me, especially after reading 3.3.1(16-19)). So would 7.6.1(11) imply that R.Component_1 and R.Component_2 be finalized in the reverse order in which they were initialized (in apparent contradiction to 7.6.1(9))? -- thanks, Adam -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own