comp.lang.ada
 help / color / mirror / Atom feed
From: "(see below)" <yaldnif.w@blueyonder.co.uk>
Subject: Elaboration query
Date: Fri, 23 Jul 2010 01:17:48 +0100
Date: 2010-07-23T01:17:48+01:00	[thread overview]
Message-ID: <C86E9E3C.14B045%yaldnif.w@blueyonder.co.uk> (raw)

I have a package which is a grandchild, and GNAT issues elaboration warnings
on its body, thus:

> with IOC.shift; pragma Elaborate_All(IOC.shift);
> package body IOC.shift.TR is
> ...
>    overriding
>    procedure Initialize (the_reader : in out IOC.shift.TR.device) is
>    begin
>       ...
>       open(...);
>       |
>>>> info: call to "open" during elaboration
>>>> info: implicit pragma Elaborate_All for "IO" generated
>>>> warning: "Initialize" called at line 31
>>>> warning: call to "open" in elaboration code requires pragma Elaborate_All
>>>> on "IO"
>    ...
>    end Initialize; ...
> end IOC.shift.TR;

The "open" operation it is complaining about is in the the IO package.

The ancestors of IOC.shift.TR begin thus:

> with IOC; pragma Elaborate_All(IOC);
> package IOC.shift is ...

and:

> with IO; pragma Elaborate_All(IO);
> package IOC is ...

How do I get rid of the warning?

I cannot put an explicit "pragma Elaborate_All(IO)" in IOC.shift.TR, because
it does not "with" IO.

Surely I should not have to "with" IO all the way down the parent/child
hierarchy? What am I doing wrong?

-- 
Bill Findlay
<surname><forename> chez blueyonder.co.uk





             reply	other threads:[~2010-07-23  0:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  0:17 (see below) [this message]
2010-07-23  2:10 ` Elaboration query Adam Beneschan
2010-07-23 14:52   ` (see below)
replies disabled

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