Version 1.2 of ais/ai-00430.txt

Unformatted version of ais/ai-00430.txt version 1.2
Other versions for file ais/ai-00430.txt

!standard 3.9.2(10/1)          05-05-05 AI95-00430/01
!class amendment 05-04-18
!status Amendment 200Y 05-05-05
!status ARG Approved 10-0-1 05-04-18
!status work item 05-04-18
!status received 05-04-18
!priority High
!difficulty Easy
!subject Conventions of inherited subprograms
!summary
The conventions of inherited dispatching operations are that of the parent or progenitor operations. Overridings of these routines have that convention by default (it can be explicitly given, but if different, the program will be illegal). If a routine overrides multiple inherited operations, they all must have the same convention.
!problem
3.9.2(10/1) does not say what happens when a type inherits routines with different conventions.
In addition, an unfriendly reading of 3.9.2(10/1) would suggest that the convention of an inherited subprogram is fixed such that even a pragma convention would be ignored.
!proposal
(See summary.)
!wording
Replace the third sentences of 3.9.2(10) by:
The convention of an inherited dispatching operation is the convention of the corresponding primitive operation of the parent or progenitor type. The default convention of a dispatching operation that overrides an inherited primitive operation is the convention of the inherited operation; if the operation overrides multiple inherited operations, then they shall all have the same convention.
!discussion
The requirement that an overriding subprogram is subtype conformant (which requires matching conventions) provides some relief. But it is better to say the obvious up front.
!example
(See discussion.)
!corrigendum 3.9.2(10)
Replace the paragraph:
In the declaration of a dispatching operation of a tagged type, everywhere a subtype of the tagged type appears as a subtype of the profile (see 6.1), it shall statically match the first subtype of the tagged type. If the dispatching operation overrides an inherited subprogram, it shall be subtype conformant with the inherited subprogram. The convention of an inherited or overriding dispatching operation is the convention of the corresponding primitive operation of the parent type. An explicitly declared dispatching operation shall not be of convention Intrinsic.
by:
In the declaration of a dispatching operation of a tagged type, everywhere a subtype of the tagged type appears as a subtype of the profile (see 6.1), it shall statically match the first subtype of the tagged type. If the dispatching operation overrides an inherited subprogram, it shall be subtype conformant with the inherited subprogram. The convention of an inherited dispatching operation is the convention of the corresponding primitive operation of the parent or progenitor type. The default convention of a dispatching operation that overrides an inherited primitive operation is the convention of the inherited operation; if the operation overrides multiple inherited operations, then they shall all have the same convention. An explicitly declared dispatching operation shall not be of convention Intrinsic.
!ACATS test
!appendix

*************************************************************

Questions? Ask the ACAA Technical Agent