comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: using pragma export/adainit/adafinal with gnat...
Date: 4 Aug 2002 07:24:27 -0700
Date: 2002-08-04T14:24:27+00:00	[thread overview]
Message-ID: <5ee5b646.0208040624.5984ba47@posting.google.com> (raw)
In-Reply-To: dstanbro-1852AF.07432903082002@news-server.bigpond.net.au

Dale Stanbrough <dstanbro@bigpond.net.au> wrote in message news:<dstanbro-1852AF.07432903082002@news-server.bigpond.net.au>...

> Indeed! (unless you -always- have pure packages).

There is nothing to guarantee that pure packages have
no elaboration code in the informal sense of the word.
There is some requirement in Annex C about not generating
memory write operations after load time, but load time is
implementation defined, so this is a dubious requirement.
There isn't even a definition of what a memory write
operation might be, that's just appealing to some informal
undefined concept. 

Whenever a requirement in the RM uses an undefined term,
the requirement is immediately dubious.

In GNAT, we have added

pragma Restrictions (No_Elaboration_Code);

to clearly pin down the issue of whether any code is
generated (in stuff we add for GNAT, we can be more informal than the RM :-)

Really the stuff about elaboration code should have been
implementation advice, then it could have been both clearer
and stronger.

An interesting thing about implementation advice is that
in practice, IA can often be stronger than a formal
requirement, since we are allowed to say what we mean
in informal, but perfectly clear terms.



  reply	other threads:[~2002-08-04 14:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 12:21 using pragma export/adainit/adafinal with gnat Dale Stanbrough
2002-08-02 18:55 ` Stephen Leake
2002-08-02 21:43   ` Dale Stanbrough
2002-08-04 14:24     ` Robert Dewar [this message]
2002-08-02 21:43   ` Dale Stanbrough
replies disabled

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