comp.lang.ada
 help / color / mirror / Atom feed
From: adh@minster.york.ac.uk
Subject: Pragma ELABORATE (was: Re: Novice Questions on Ada Exceptions)
Date: 30 Aug 89 10:00:07 GMT	[thread overview]
Message-ID: <620474407.3175@minster.york.ac.uk> (raw)
In-Reply-To: 20600004@inmet

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)

      reply	other threads:[~1989-08-30 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-08-21  1:22 Novice Questions on Ada Exceptions Tom McClory
1989-08-23 12:53 ` stt
1989-08-30 10:00   ` adh [this message]
replies disabled

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