From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Libraries written in Ada
Date: Tue, 23 Nov 2004 12:38:57 +0100
Date: 2004-11-23T12:38:57+01:00 [thread overview]
Message-ID: <41A32151.5000705@mailinator.com> (raw)
In-Reply-To: <pan.2004.11.23.11.03.08.551267@ID-174572.user.uni-berlin.de>
Thomas Lotze wrote:
> On Tue, 23 Nov 2004 10:48:45 +0100, Martin Krischik wrote:
>
>
>>can be preelaborated by the compiler and then no runtime elaboration is
>>needed.
>
>
> How can I find out whether the code produced by the compiler (not a
> specific one, but any compiler that conforms to the spec) needs runtime
> elaboration? Are there simple rules such as "this code pattern may or does
> require runtime elaboration while that pattern can be safely assumed to
> work without"? I'd have to dig further through the references, but I
> haven't found a clear statement so far.
Look for the pragma No_Runtime if you're using Gnat.
And look in the Ada Reference Manual for the pragmas Pure, Preelaborate
& Elaborate_Body for elaboration concerns. I read these from time to
time and always manage to forget the details ;)
In particular, I'm not sure about the situation when your package can't
have "preelaborate" and you don't specify an "elaborate_body". It's not
the same (at least Gnat doesn't behave the same).
And then there's that "elaborate" and "elaborate_all" which I suspect
that apply in the previous case, but I never like to use. I don't like
the package that uses another to have to worry about such pragmas, I
prefer to have everything self-managed when possible. But maybe I'm
confusing something.
Finally you have that Gnat warning switch (that I don't remember now)
which will warn you about elaboration order problems. Activating it late
in a project will make you cry when you see the lots of "elaborate_all
needed" it reports and you don't understand why :P
Hint to adapower and adaworld :D : Set Up an explanation for the
elaboration misteries of Ada in non-ARM speak.
next prev parent reply other threads:[~2004-11-23 11:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 11:32 Libraries written in Ada Thomas Lotze
2004-11-22 15:58 ` Martin Krischik
2004-11-22 16:28 ` Thomas Lotze
2004-11-22 16:46 ` Alex R. Mosteo
2004-11-22 19:09 ` Pascal Obry
2004-11-23 11:12 ` Alex R. Mosteo
2004-11-22 17:59 ` Martin Krischik
2004-11-22 20:36 ` Thomas Lotze
2004-11-22 21:25 ` Georg Bauhaus
2004-11-22 21:45 ` Thomas Lotze
2004-11-22 22:07 ` Georg Bauhaus
2004-11-22 22:27 ` Thomas Lotze
2004-11-23 9:54 ` Adrien Plisson
2004-11-23 9:55 ` Martin Krischik
2004-11-23 9:55 ` Martin Krischik
2004-11-23 9:48 ` Martin Krischik
2004-11-23 11:03 ` Thomas Lotze
2004-11-23 11:38 ` Alex R. Mosteo [this message]
2004-11-23 12:22 ` Georg Bauhaus
2004-11-23 13:20 ` Alex R. Mosteo
2004-11-23 13:40 ` Alex R. Mosteo
2004-11-23 12:36 ` Martin Krischik
2004-11-23 13:53 ` Thomas Lotze
2004-11-23 18:39 ` Jeffrey Carter
2004-11-22 20:45 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox