From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e14364d52e5cbe8d,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news2.arglkargh.de!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Elaboration query Date: Fri, 23 Jul 2010 01:17:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net q/u2QgVVJaKRCL8C7B6IgQ3wS4Kss7i714Wc4VzHP4xfthRyRZ Cancel-Lock: sha1:vT5ws9tHkiSJpW3JP+dqGK5d+t8= User-Agent: Microsoft-Entourage/12.23.0.091001 Thread-Topic: Elaboration query Thread-Index: Acsp/HrduBWM5io72EOsfkx1zAdrWA== Xref: g2news1.google.com comp.lang.ada:12492 Date: 2010-07-23T01:17:48+01:00 List-Id: 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 chez blueyonder.co.uk