comp.lang.ada
 help / color / mirror / Atom feed
* Elaboration worries
@ 2006-06-21 12:33 Alex R. Mosteo
  2006-06-21 18:01 ` Samuel Tardieu
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Alex R. Mosteo @ 2006-06-21 12:33 UTC (permalink / raw)


Hello,

I'm revisiting this topic in hope of enlightenment by someone that really
understand the dark magic behind elaboration. I've read the relevant
sections of the ARM but I can just grasp a more-or-less depth
understanding, of which details fade away with time.

From past discussions and from reading an old article of Mr. Dewar, my rule
of thumb is that you should

a) make your package Pure.
b) if not possible, make it Preelaborate.
c) if not possible, put an Elaborate_Body in the spec.

I was happy following this rule, but just recently I've started to
experiment with the -gnatwl switch, that warns when a "Elaborate_All" is
needed. I have two questions related with this. 

The first one is that I don't really grasp why a "Elaborate_All" could be
needed if one strictly follows the tree rules above.

The second one is this: by my observation of the gnat warnings, it seems
that the requirement for "Elaborate_All" is a "server side" one. However, I
must use the E_A in all "client side" units. This is because contrarily to
the abc) rule pragmas, that can refer to the package where they appear, E_A
can not.

Example: Package A causes a warning for E_A in all packages that use A. I
can't do nothing at A to remove the warning, but to put an E_A(A) in all
client packages. This seems strange to me.

A final note is that this second situation happens to me mostly with generic
units.

Thanks for any comments,

A. Mosteo.



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

end of thread, other threads:[~2006-06-23 19:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 12:33 Elaboration worries Alex R. Mosteo
2006-06-21 18:01 ` Samuel Tardieu
2006-06-21 20:34 ` Randy Brukardt
2006-06-21 23:07   ` Samuel Tardieu
2006-06-22 23:06     ` Randy Brukardt
2006-06-23 18:42       ` Samuel Tardieu
2006-06-23 19:54         ` Randy Brukardt
2006-06-21 23:12   ` Robert A Duff
2006-06-22 23:09     ` Randy Brukardt
2006-06-21 23:07 ` Robert A Duff
2006-06-22  2:24   ` Matthew Heaney
2006-06-22 10:36 ` Alex R. Mosteo
2006-06-22 16:25   ` Alex R. Mosteo
2006-06-22 23:31   ` Randy Brukardt

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