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