This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/38329] New: Illegal program not detected, "private with" in a generic package
- From: "ludovic at ludovic-brenta dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2008 14:38:42 -0000
- Subject: [Bug ada/38329] New: Illegal program not detected, "private with" in a generic package
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
package pak1 is
end pak1;
package pak1.pak2 is
x1: integer;
end pak1.pak2;
private with pak1.pak2;
generic
package pak1.pak3 is
x2 : integer := pak1.pak2.x1; -- ERROR: "pak2" is not visible
x3 : integer := pak2.x1; -- ERROR: "pak2" is not visible
end pak1.pak3;
In Pak1.Pak3, Pak2 should be visible only in the private part, therefore
invisible in the public part. Thus the two declarations (x2 and x3) are
illegal.
--
Summary: Illegal program not detected, "private with" in a
generic package
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic at ludovic-brenta dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38329