comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com (Adam Beneschan)
Subject: Preelaborable generic body: question
Date: 29 Nov 2004 18:05:20 -0800
Date: 2004-11-29T18:05:20-08:00	[thread overview]
Message-ID: <b4682ab7.0411291805.1579e730@posting.google.com> (raw)

In this example:

generic
   x1: integer;
package pak2 is
   pragma Preelaborate;
   pragma Elaborate_Body;
end pak2;

package body pak2 is
   x2: integer := x1;
end pak2;

My reading is that 10.2.1(10) makes this illegal, because it's
possible to instantiate pak2 with an actual for "x1" that would cause
the declaration of x2 to perform an action that 10.2.1(6-7) makes
nonpreelaborable.  (You could instantiate pak2 with an actual that
contains a function call or the name of an object, e.g.)

Is my reading correct?

                                   -- thanks, Adam



             reply	other threads:[~2004-11-30  2:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30  2:05 Adam Beneschan [this message]
2004-11-30  2:43 ` Preelaborable generic body: question Stephen Leake
replies disabled

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