comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Visibility of package parameters in child packages
Date: Thu, 17 Dec 2009 10:50:48 -0800 (PST)
Date: 2009-12-17T10:50:48-08:00	[thread overview]
Message-ID: <41271feb-c455-46f4-8215-35181cca3dea@d10g2000yqh.googlegroups.com> (raw)
In-Reply-To: hgbtf5$va5$1@munin.nbi.dk

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.



  reply	other threads:[~2009-12-17 18:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 19:28 Visibility of package parameters in child packages Andrea Taverna
2009-12-15 21:00 ` Georg Bauhaus
2009-12-16 11:50   ` Andrea Taverna
2009-12-16 13:14     ` Georg Bauhaus
2009-12-16 14:21       ` Andrea Taverna
2009-12-16 15:54         ` Georg Bauhaus
2009-12-16 16:54           ` Andrea Taverna
2009-12-16 18:54             ` Georg Bauhaus
2009-12-16 21:44               ` Adam Beneschan
2009-12-16 21:26             ` sjw
2009-12-17  0:19     ` Randy Brukardt
2009-12-17 18:50       ` Ludovic Brenta [this message]
2009-12-16 21:27 ` Adam Beneschan
replies disabled

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