!standard 14.43 12-12-03 SI99-0065-1/01 !class binding interpretation 12-12-03 !status work item 12-12-03 !status received 12-11-21 !priority High !difficulty Medium !qualifier Omission !subject Generic_Actual_Part and null procedure defaults !summary In a normalized association returned by Generic_Actual_Part where the actual is defaulted, and the default is a formal null procedure, the An_Expression component is an implicit naming expression which denotes an implicit null procedure. The name and profile of the implicit null procedure are copied from those of the corresponding formal procedure. The enclosing element of the implicit null procedure is the expanded declaration from the instantiation. !question Given an instantiation of: generic with procedure P (X : Integer) is null; procedure Gen; The query Generic_Actual_Part does not define what is the actual in the association for formal P if Normalized is True and the instantiation does not provide an explicit actual for P. Should this be fixed? (Yes) !recommendation (See summary.) !wording ** TBD. !discussion In other cases, the default element eventually ends up in some element from the text of the program that is returned as the actual of the instantiation. However, if the default is "null", the whole actual is implicitely built by the compiler. It makes sense to return this implicitely built procedure as the actual. Since elements from this implicit procedure can be queried, it is necessary to define its name and parameter profile. Short of having anything else available, it makes sense to define them as "copies" (is it the right term?) of those of the formal. It is suggested that the enclosing element of this procedure be the instantiated declaration, similar to other artificially built elements of an instantiation, as ASIS-for-Gnat does. OTOH, the standard does not define the enclosing elements of other implicit elements created by instantiations, so we may leave this undefined as well - or specify it for other elements. !appendix From: Jean-Pierre Rosen Sent: Wednesday, November 21, 2012 12:45 AM This is an issue that recently came up with the diabolic pair AdaControl/Eurocontrol. The paragraph refered to is the one from the latest ASIS draft, the issue didn't exist in ASIS99 since Ada95 had no null procedures. [Attached was version /01 of the SI - Editor.] ****************************************************************