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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,16e3a8dd4f3ab3f3 X-Google-Attributes: gid103376,public From: ncohen@watson.ibm.com (Norman H. Cohen) Subject: Re: Elaboration order Date: 1996/03/19 Message-ID: <4in4am$klb@watnews1.watson.ibm.com>#1/1 X-Deja-AN: 143130797 distribution: world references: <314701A1.469D@lfwc.lockheed.com> <31494143.3825@lfwc.lockheed.com> <4icbnc$cda@wdl1.wdl.loral.com> <314D2E1C.5C72@lfwc.lockheed.com> organization: IBM T.J. Watson Research Center reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada Date: 1996-03-19T00:00:00+00:00 List-Id: In article <314D2E1C.5C72@lfwc.lockheed.com>, Ken Garlington writes: |> In fact, in general, for all respondents to this question, if you |> say that pragma Elaborate is _not_ needed in a particular context, |> please cite an 83 reference. I can't even find a reference that |> says the body can be assured of the elaboration of its own spec! RM83-10.5(2): "The elaboration of these library units and of the corresponding libarary unit bodies is performed in an order consistent with the partial ordering defined by the with clauses (see 10.3)." In other words, if compilation unit A must be compiled, according to the rules of RM83-10.3, before compilation unit B, then it is guaranteed that A will be elaborated before B. However, if package Client has a with clause for package Provider, this only guarantees that the DECLARATION of package Provider will be elaborated before the declaration (and body) of package Client. The BODY of package Provider could be elaborated later. If the elaboration of the declaration or body of Client uses a facility provided by Provider, that declaration or body should contain (in Ada 83) an Elaborate pragma for Provider, to ensure that the BODY of Provider is also elaborated before that compilation unit. -- Norman H. Cohen ncohen@watson.ibm.com