From: mheaney@ni.net (Matthew Heaney)
Subject: Re: AQ&S Guidance on pragma Elaborate_Body
Date: 1997/04/22
Date: 1997-04-22T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680002204972039270001@news.ni.net> (raw)
In-Reply-To: E91yH8.36E@world.std.com
In article <E91yH8.36E@world.std.com>, bobduff@world.std.com (Robert A
Duff) wrote:
>>But isn't G2 supposed to elaborate G1?
>>
>>with G1;
>>pragma Elaborate (G1); <<<---
>>package body G2 is
>> package Inst_1 is new G1;
>>end G2;
>
>No, G2 does not instantiate G1 during its (G2's) elaboration. In fact,
>G2 doesn't do anything during elaboration, except to record the fact
>that it has now been elaborated.
>
>But I
>thought we were discussing this convention: X should have
>pragma-Elaborate_All of Y if and only if X calls/instantiates/activates
>some subprogram/generic/task in Y during X's elaboration (unless Y has
>Pure, Preelab, or Elab_Body). And you asked, with respect to this
>convention, whether it should be Elab instead of Elab_Body.
OK, I almost understand. The elaboration of the generic itself is not very
interesting: it's the elaboration of the instantiation that we need to
think about carefully. The rules go like this:
Why You Need Pragma Elaborate_All And Not Just Elaborate
o An instantiation of a generic inside another generic (package) isn't
really elaborated until the elaboration of the instantiation of the
enclosing generic. So that's why we need pragma Elaborate_All and not just
pragma Elaborate.
o If you call a subprogram of a package you with'd during your
elaboration, you need to pragma Elaborate_All, to cover elaboration of
library units in the called subprogram.
I think I've got it. Thank you, Bob, once again...
Matt
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1997-04-22 0:00 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-18 0:00 AQ&S Guidance on pragma Elaborate_Body JP Thornley
1997-04-18 0:00 ` Robert Dewar
1997-04-19 0:00 ` Michael Paus
1997-04-19 0:00 ` Robert A Duff
1997-04-21 0:00 ` Robert Dewar
1997-04-23 0:00 ` Robert A Duff
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert Dewar
1997-04-25 0:00 ` Robert A Duff
1997-04-25 0:00 ` Mats Weber
1997-04-25 0:00 ` Robert I. Eachus
1997-04-26 0:00 ` Nick Roberts
1997-04-26 0:00 ` Robert Dewar
1997-04-28 0:00 ` Robert I. Eachus
1997-04-29 0:00 ` Robert Dewar
1997-04-29 0:00 ` Robert I. Eachus
1997-04-27 0:00 ` Robert Dewar
1997-04-28 0:00 ` Mats Weber
1997-04-29 0:00 ` Redefinition of "=", elaboration and learning Ada Mats Weber
1997-04-29 0:00 ` Robert A Duff
1997-04-30 0:00 ` Mats Weber
1997-04-26 0:00 ` AQ&S Guidance on pragma Elaborate_Body Nick Roberts
1997-04-26 0:00 ` Robert Dewar
1997-04-24 0:00 ` Mats Weber
1997-04-24 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
1997-04-25 0:00 ` Robert Dewar
1997-04-20 0:00 ` Robert Dewar
1997-04-21 0:00 ` Michael F Brenner
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Matthew Heaney
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-24 0:00 ` Jon S Anthony
1997-04-24 0:00 ` Matthew Heaney
1997-04-26 0:00 ` Robert Dewar
1997-04-26 0:00 ` Matthew Heaney
1997-04-27 0:00 ` Robert Dewar
1997-04-29 0:00 ` John G. Volan
1997-04-29 0:00 ` Matthew Heaney
1997-04-30 0:00 ` Jon S Anthony
1997-05-01 0:00 ` John G. Volan
1997-05-02 0:00 ` Booch "forms" and child packages [was: AQ&S Guidance on pragma Elaborate_Body] John G. Volan
1997-05-02 0:00 ` AQ&S Guidance on pragma Elaborate_Body John G. Volan
1997-04-26 0:00 ` Nick Roberts
1997-04-26 0:00 ` Matthew Heaney
1997-04-26 0:00 ` Robert A Duff
1997-04-25 0:00 ` Robert Dewar
1997-04-25 0:00 ` Michael F Brenner
1997-04-26 0:00 ` Nick Roberts
1997-04-24 0:00 ` Laurent Guerby
1997-04-18 0:00 ` Robert A Duff
1997-04-21 0:00 ` Michael F Brenner
1997-04-22 0:00 ` Robert A Duff
1997-04-20 0:00 ` Doug Smith
1997-04-20 0:00 ` Robert Dewar
1997-04-21 0:00 ` Matthew Heaney
1997-04-21 0:00 ` Robert A Duff
1997-04-21 0:00 ` Robert Dewar
1997-04-22 0:00 ` Robert A Duff
1997-04-24 0:00 ` Robert Dewar
1997-04-21 0:00 ` Matthew Heaney
1997-04-21 0:00 ` Matthew Heaney
1997-04-22 0:00 ` Robert A Duff
1997-04-22 0:00 ` Matthew Heaney
1997-04-22 0:00 ` Robert A Duff
1997-04-22 0:00 ` Matthew Heaney [this message]
1997-04-23 0:00 ` Robert A Duff
1997-04-24 0:00 ` Matthew Heaney
1997-04-24 0:00 ` Robert A Duff
1997-04-25 0:00 ` Robert Dewar
1997-04-23 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert Dewar
1997-04-24 0:00 ` Robert A Duff
1997-04-22 0:00 ` Mats Weber
1997-04-23 0:00 ` Robert Dewar
1997-04-21 0:00 ` Robert A Duff
-- strict thread matches above, loose matches on Subject: below --
1997-04-30 0:00 W. Wesley Groleau (Wes)
1997-04-30 0:00 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox