!standard B.03 (71) 05-02-28 AI95-00337/03 !class binding interpretation 03-07-31 !status Amendment 200Y 04-12-02 !status WG9 Approved 06-06-09 !status ARG Approved 8-0-2 04-11-20 !status work item 03-07-31 !status received 03-01-13 !qualifier Clarification !priority Low !difficulty Easy !subject Applicability of C interfacing advice to private types !summary The rules of B.3(66-71) apply to private types by applying the appropriate rule for the full type. !question Several of the rules given in the Implementation Advice section of B.3 are framed in terms of specific kinds of types. For example, the rule for t* parameter passing in B.3(69/1) is described as applying to parameters of record types. It would seem sensible for the same advice to pertain to parameters of a private type whose full type is a record type. Are these rules also intended to apply to private types whose full types are in the given classes of types? (Yes.) !recommendation (See wording.) !wording Add after B.3(71): An Ada parameter of a private type is passed as specified for the full view of the type. !discussion Parameter passing properties are the same for all views (see 6.2). These also are parameter passing properties, and thus they should be consistent for all views. !corrigendum B.03(71) @dinsa @xbullet @dinst An Ada parameter of a private type is passed as specified for the full view of the type. !ACATS test An ACATS test could be constructed to test this, but it would be difficult and somewhat system-dependent. !appendix !topic Applicability of C interfacing advice to private types !reference RM95-B.3(66-71) !from Gary Dismukes 03-01-13 !discussion This question arose because of a customer inquiry. Several of the rules given in the Implementation Advice section of B.3 are framed in terms of specific kinds of types. For example, the rule for t* parameter passing in B.3(69/1) is described as applying to parameters of record types. It would seem sensible for the same advice to pertain to parameters of a private type whose full type is a record type. Are these rules also intended to apply to private types whose full types are in the given classes of types? **************************************************************** From: Pascal Leroy Sent: Tuesday, January 14, 2003 4:14 AM AI 117 states that "The convention of the partial view of a private type or private extension is the convention of the full type." The AI was written is this fashion because it was argued that the parameter passing mechanism has to be determined by looking at the completion of the type (see paragraphs 2.a and 2.c of the !discussion section). I was uncomfortable with this at the time because it constitutes a breach of privacy, but there was no other reasonable option. Anyway now that the camel's nose is in the tent it would seem logical to say that the rules in B.3(66-71) are applied by looking at the completion of the type. **************************************************************** From: Robert Dewar Sent: Tuesday, January 14, 2003 4:22 AM I agree. By the way, this is not just theory, we had a customer who specifically worried that a private record might not be covered by the rules as stated. ****************************************************************