This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada question about PR 18434
- From: Robert Dewar <dewar at adacore dot com>
- To: Laurent GUERBY <laurent at guerby dot net>
- Cc: Arnaud Charlet <charlet at adacore dot com>, Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>, gcc at gcc dot gnu dot org
- Date: Sat, 01 Oct 2005 08:37:17 -0400
- Subject: Re: Ada question about PR 18434
- References: <1128112128.12250.124.camel@pc.site>
Laurent GUERBY wrote:
However I see no reason why Osint body elaboration must be done
before Osint.M body elaboration, it seems to me that the
binder could perfectly choose to elaborate Osint.M body
before Osint body, and this would leave Running_Program
with the "wrong" value Rainer observes when gnatmake is running.
Sorry I don't get this. There is an elaboration call from the
package body of Osint.M to a subprogram declared in the body
of Osint. That means that the body of Osint has to be elaborated
before the body of Osint.M. That is what the static model of
elaboration is all about, ensuring such conditions are met.
Note that it is quite wrong to try to compile GNAT with the
dynamic model of elaboration.
If I'm guessing correctly there are two solutions:
No problem in the sources, so no solution needed. If you
are managing to see a problem, this is not the source.
You can of course check the order of elaboration by
looking at it. I would be surprised if there were a
bug in the statid elab model for such a simple case,
and indeed the elab order is certainly right in my
builds.