This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch fixes a visbility error involving the use the name of a generic package GP as a selector for a formal package that is an instantiation of GP. Compiling p-child.adb below must yield: p-child.ads:9:43: "P1" is not a visible entity of "Tested" package body P.Child is package body P1 is package body P2 is procedure Proc_2 is begin null; end Proc_2; end P2; end P1; end P.Child; --- package P.Child is generic with package Tested is new P.P1 (<>); package P1 is generic -- with package Tested is new Tested.P2 (<>); with package Tested is new Tested.P1.P2 (<>); package P2 is procedure Proc_2; end P2; end P1; end P.Child; --- package P is generic package P1 is generic package P2 is procedure Proc; end P2; end P1; end P; Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an instantiation and a formal package the compiler generates a package renaming declaration so that the generic name within the declaration is interpreted as a renaming of the instance. At the end of a formal package declaration, this renaming must become invisible.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |