comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Elaboration circularity
Date: 2000/02/02
Date: 2000-02-02T00:00:00+00:00	[thread overview]
Message-ID: <2sZl4.546$Gi4.22062@newsread1.prod.itd.earthlink.net> (raw)
In-Reply-To: 949502026.152029@edh3

In article <949502026.152029@edh3> , Frode Tenneboe 
<ft@alne.edh.ericsson.se>  wrote:

Did you try doing as GNAT suggested?

The body of edhipc looks something like this:

with edhipclog;
package body edhipc is


Change that by adding a pragma Elaborate_All:

with edhipclog;
pragma Elaborate_All (edhipclog);
package body edhipc is


Make sure the spec of edhipc doesn't have a categorization pragma (in
other words, don't force immediate elaboration of the body).

I think you want to the elaboration order to be:

edhipc (spec)
edhipclog (spec)
edhipclog (body)
edhipc (body)



> I am currently looking into some legacy code which is heavily nested
> with cirular dependencies. Compiling with gnat give the following message:
>
> gnatbind -x client.ali
> error: elaboration circularity detected
> info:    "edhipc (body)" must be elaborated before "edhipc (body)"
> info:       reason: Elaborate_All probably needed in unit "edhipc (body)"
> info:       recompile "edhipc (body)" with -gnatwl for full details
> info:          "edhipc (body)"
> info:             is needed by its spec:
> info:          "edhipc (spec)"
> info:             which is withed by:
> info:          "edhipclog (spec)"
> info:             which is withed by:
> info:          "edhipc (body)"
> gnatmake: *** bind failed.
> *** Error code 4
> make: Fatal error: Command failed for target `client'




  reply	other threads:[~2000-02-02  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-02  0:00 Elaboration circularity Frode Tenneboe
2000-02-02  0:00 ` Matthew Heaney [this message]
2000-02-02  0:00 ` Jeff Carter
2000-02-05  0:00   ` Robert Dewar
2000-02-07  0:00     ` Frode Tenneboe
2000-02-07  0:00       ` Robert Dewar
2000-02-07  0:00       ` Larry Kilgallen
replies disabled

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