!standard 06.03.01 (11) 98-03-27 AI95-00198/00 !class confirmation 98-03-27 !status received 98-03-27 !priority Low !difficulty Easy !subject pragma Convention(Intrinsic) is not a completion !summary 98-03-27 !question 98-03-27 !response 98-03-27 !appendix 98-03-27 !section 6.3.1(11) !subject is pragma convention(intrinsic a completion !reference AARM-6.3.1(11b) !from Samuel T. Gregory 98-01-28 !reference 1998-15796.a Samuel T. Gregory 1998-1-28>> !discussion We have a question about a possible missing rule. We have not found anything to imply that "pragma convention(intrinsic,S)" is a completion of subprogram S, although it seems to be used that way in the specifications of the predefined language environment. The closest thing we have found is 6.3.1(11.b) Whenever we wish to disallow the Access attribute in order to ease implementation, we make the subprogram Intrinsic. Several language-defined subprograms have ``pragma Convention(Intrinsic, ...);''. An implementation might actually implement this as ``pragma Import(Intrinsic, ...);'', if there is really no body, and the implementation of the subprogram is built into the code generator. This seems to allude to a rule such as (No, I am not proposing this wording) For a subprogram S, "pragma Import(Intrinsic,S)" [is a completion and] means S must be found on the list of subprograms which the code generator is prepared to fill in, whereas "pragma Convention(Intrinsic,S)" is a completion if and only if S is found on the list of subprograms which the code generator is prepared to fill in; if S is not found on the list, a body is required. If my made-up rule above is close to what was intended, surely paragraph 6.3.1(11.b) is not the sole support for it? **************************************************************** !section 6.3.1(11) !subject is pragma convention(intrinsic a completion !reference AARM-6.3.1(11b) !reference 1998-15796.a Samuel T. Gregory 98-01-28 !from Tucker Taft 98-01-28 !reference 1998-15797.a Tucker Taft 1998-1-28>> !discussion The short answer to the question is "no." : We have a question about a possible missing rule. : We have not found anything to imply that "pragma convention(intrinsic,S)" is : a completion of subprogram S, although it seems to be used that way in the : specifications of the predefined language environment. Pragma convention is never a completion. : ... The closest thing we have found is 6.3.1(11.b) : Whenever we wish to disallow the Access attribute in : order to ease implementation, we make the subprogram Intrinsic. : Several language-defined subprograms have ``pragma : Convention(Intrinsic, ...);''. An implementation might actually : implement this as ``pragma Import(Intrinsic, ...);'', if there : is really no body, and the implementation of the subprogram is : built into the code generator. : This seems to allude to a rule such as (No, I am not proposing this wording) : For a subprogram S, : "pragma Import(Intrinsic,S)" [is a completion and] means : S must be found on the list of subprograms which the code generator : is prepared to fill in, whereas : "pragma Convention(Intrinsic,S)" is a completion if and only if : S is found on the list of subprograms which the code generator : is prepared to fill in; : if S is not found on the list, a body is required. : If my made-up rule above is close to what was intended, surely paragraph : 6.3.1(11.b) is not the sole support for it? Paragraph 6.3.1(11.b) was intended to explain the use of pragma Convention in the RM. The goal was to make it clear that a pragma Convention(Intrinsic, ...) would have to be replaced with a pragma Import(Intrinsic, ...) if there was not going to be a body written in Ada. In other words, you need to use pragma Import if there won't be an Ada body, since only pragma Import is a completion in itself; pragma Convention is not a completion. Apparently our attempt to clarify via 6.3.1(11.b) didn't work! -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA ****************************************************************