comp.lang.ada
 help / color / mirror / Atom feed
* Preelaborable generic body: question
@ 2004-11-30  2:05 Adam Beneschan
  2004-11-30  2:43 ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Beneschan @ 2004-11-30  2:05 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-30  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30  2:05 Preelaborable generic body: question Adam Beneschan
2004-11-30  2:43 ` Stephen Leake

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