comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: GNAT 3.09 vs 3.10 on Linux
Date: 1997/09/22
Date: 1997-09-22T00:00:00+00:00	[thread overview]
Message-ID: <01bcc74b$dd2eaeb0$3d8371a5@dhoossr> (raw)
In-Reply-To: 01bcc6cc$c839f200$8dfd1fcc@p5120


I found what may be similar differences between 3.09 and 3.10, although
it's diffucult to say for
sure, because you didn't give an exact quote of the messages you received.

What I encountered were circular elaboration dependencies.  The compiler
was correct, and
the solution was to remove elaboration code from one of the package bodies
in the loop.
What I had to do was to put the body initialization code in a procedure, so
that the body did not
require elaboration.  The, I placed a boolean variable in the package body,
initialized to False,
which indicated whether initialization had been done.  Finally, in all of
the subprograms in that
body which depended on the initialization being done, I placed a
conditional call to the
initilaization procedure, and set the boolean to True.

I did it this way, because to redesign the package dependencies would have
required more
time than the schedule allows.

I, for one am grateful for the new elaboration dependency checking in gnat
3.10, as having it
sooner would have saved lots of debugging time where people had not used
pragma
Elaborate where they shoud have, and then the program dies with a
Program_Error exception.
I had always wondered why ada prelinkers/binders didn't get it right before
now -- but it
surely looks like they have it now.

By the way, this was on two different platforms -- sun Solaris and Wnindows
NT, but I'm sure
the logic is the same for Linux

David C. Hoos, Sr.
david.c.hoos.sr@ada95.com

bklungle <bklungle@ix.netcom.com> wrote in article
<01bcc6cc$c839f200$8dfd1fcc@p5120>...
> I have been using 3.09 for the last 6 months on a system (about 22_000
> lines). Compiles on Verdix also. On the 12th of Sep, I downloaded 3.10
and
> installed it. The compilation phase took over twice as long as 3.09, and
it
> claimed there were circular package dependencies which no other compiler
> mentioned. I traced them by hand and it seems to think any body arrivable
> at more than once by tracing across specs and bodies is circular. This
> trace appears to be wrong. It refuses to continue. I reinstalled 3.09 and
> all is now well. Anybody seen similar??
> 
> bob
> 




      parent reply	other threads:[~1997-09-22  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-21  0:00 GNAT 3.09 vs 3.10 on Linux bklungle
1997-09-22  0:00 ` David C. Hoos, Sr.
1997-09-23  0:00   ` bklungle
1997-09-22  0:00 ` David C. Hoos, Sr. [this message]
replies disabled

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