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!news1.google.com!postnews.google.com!d10g2000yqh.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Visibility of package parameters in child packages Date: Thu, 17 Dec 2009 10:50:48 -0800 (PST) Organization: http://groups.google.com Message-ID: <41271feb-c455-46f4-8215-35181cca3dea@d10g2000yqh.googlegroups.com> References: <4b27f8e9$0$6591$9b4e6d93@newsspool3.arcor-online.net> <02e4d172-0eb9-4c2a-ac0f-68e151916d59@o19g2000vbj.googlegroups.com> NNTP-Posting-Host: 94.108.232.210 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1261075848 17508 127.0.0.1 (17 Dec 2009 18:50:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 17 Dec 2009 18:50:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d10g2000yqh.googlegroups.com; posting-host=94.108.232.210; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091123 Iceweasel/3.5.5 (like Firefox/3.5.5; Debian-3.5.5-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8410 Date: 2009-12-17T10:50:48-08:00 List-Id: Randy Brukardt wrote on comp.lang.ada: > "Andrea Taverna" wrote: > >-----%<-----%<-----%<-----%<-----%< > >]# 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. ;-) Could it be http://gcc.gnu.org/PR16078 ? This has just been brought to my attention. -- Ludovic Brenta.