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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!att!dptg!rutgers!cs.utexas.edu!uunet!mcsun!ukc!reading!minster!adh From: adh@minster.york.ac.uk Newsgroups: comp.lang.ada Subject: Pragma ELABORATE (was: Re: Novice Questions on Ada Exceptions) Message-ID: <620474407.3175@minster.york.ac.uk> Date: 30 Aug 89 10:00:07 GMT References: <620@thor.wright.EDU> <20600004@inmet> Reply-To: adh@SoftEng.UUCP (adh) Organization: Department of Computer Science, University of York, England List-Id: In article <20600004@inmet> stt@inmet writes: >The usual fix is to >determine which package calls which other package at >elaboration time, and place a pragma Elaborate (see LRM 10.5:3) >in the calling package referencing the called package. >Note that if the called package calls other packages, there >may be a need to include additional pragma Elaborates on >those lower level packages. Pragma Elaborate only forces >elaboration for a single level of dependency. Hopefully, >Ada 9X will fix it so that it forces elaboration for >the closure of dependencies... I assume that the possible need for additional pragma ELABORATEs is because there may be further cases of package body being called before it has elaborated that will be exposed when the first error is fixed. The problem I have is with the suggestion that pragma ELABORATE should be changed to force elaboration of all package (actually library unit?) bodies in the closure of dependencies, as part of 9X. I don't think this is necessary - the pragma is intended only to indicate that prior elaboration of a particular body, whose specification will already have been elaborated, is required. Indeed, I can contrive examples where the current pragma ELABORATE will ensure elaboration completes, but the proposed new semantics would prevent elaboration (i.e. the package whose body carries the pragma ELABORATE is in the closure of the bodies of units depended upon by the package named by the pragma ELABORATE). Or am I missing somthing? Andy Hutcheon (adh@uk.ac.york.minster)