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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,12eefe849df97d15 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Visibility of package parameters in child packages Date: Wed, 16 Dec 2009 18:19:48 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <4b27f8e9$0$6591$9b4e6d93@newsspool3.arcor-online.net> <02e4d172-0eb9-4c2a-ac0f-68e151916d59@o19g2000vbj.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1261009189 32069 69.95.181.76 (17 Dec 2009 00:19:49 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 17 Dec 2009 00:19:49 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:8407 Date: 2009-12-16T18:19:48-06:00 List-Id: "Andrea Taverna" wrote in message news:02e4d172-0eb9-4c2a-ac0f-68e151916d59@o19g2000vbj.googlegroups.com... ... >-----%<-----%<-----%<-----%<-----%< >]# gnatmake main.adb >gcc -c main.adb >main.adb:9:05: instantiation error at parent-child.adb:6 >main.adb:9:05: "F" is not visible (more references follow) >main.adb:9:05: instantiation error at parent-child.adb:6 >main.adb:9:05: non-visible declaration at q.ads:3 >gnatmake: "main.adb" compilation error >-----%<-----%<-----%<-----%<-----%< I haven't studied this code carefully, but this error message suggests to me that the compiler has a bug. An instantiation should never, ever be illegal because of something that occurs in the body of the generic. Legality rules don't apply to generic bodies at instantiation time (only when the generic unit is compiled). It's possible that the compiler has delayed the compilation of the body to the point of the instantation, but even then, the error (if there is one, and I don't think there is) belongs to the body, not the instantiation. So at the very least the error message is misleading. So I suggest reporting this to your vendor and see what they say. (And I'm glad I'm not your vendor in this case, 'cause I wouldn't want to have to debug this one. ;-) Randy.