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] |
Test on i686-linux, committed on trunk. For a subprogram instantiation we create a wrapper package that provides a scope for the renaming declarations that capture the actuals. The spec and body of the instance are within the wrapper, and the visible entity created by the instantiation is declared as a renaming of the subprogram within the wrapper. Calls to the subprogram use this visible entity. Previously the name denoted by the with_clause was set to the anonymous subprogram within the wrapper, but this leads to visibility problems when the instance is a child unit. Package p-c.ads must compile quietly: -- package P is end; -- generic function P.G return Boolean; -- with P.G; function P.H is new P.G; -- with P.H; package P.C is B : Boolean := H; end; 2006-02-17 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Analyze_With_Clause): If the unit is a subprogram instantiation, the corresponding entity is the related_instance of the wrapper package created for the instance.
Attachment:
difs.10
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |