CVS difference for ais/ai-00397.txt

Differences between 1.5 and version 1.6
Log of other versions for file ais/ai-00397.txt

--- ais/ai-00397.txt	2005/05/10 03:49:18	1.5
+++ ais/ai-00397.txt	2005/06/16 23:47:39	1.6
@@ -1,10 +1,12 @@
-!standard 6.3.1(24)                                    05-05-05  AI95-00397/04
-!standard 8.3(26)
+!standard 6.3.1(24)                                    05-05-09  AI95-00397/05
+!standard 6.4(10)
+!standard 8.3.1(1)
 !standard 9.1(9.1)
 !standard 9.4(11)
 !standard 9.5.2(2)
 !standard 9.5.2(10)
 !standard 9.5.2(13)
+!standard 10.1.1(8)
 !class amendment 05-01-25
 !status Amendment 200Y 05-03-14
 !status ARG Approved 10-0-0  05-02-13
@@ -26,6 +28,11 @@
 protected subprograms, even though they don't override anything (they implement
 the parent subprogram).
 
+Finally, if a prefixed view call is made to an operation of a tagged task or
+protected type, the call could be ambiguous if there is both primitive
+operations and protected operations or task entries that have the same
+prefixed view profile.
+
 !proposal
 
 Defined the term *prefixed view profile* to reduce the verbiage about
@@ -37,6 +44,12 @@
 Also, fix the "implemented by" rules to be rechecked in the private part of
 generic instances (certainly, we want these rules to be enforced everywhere).
 
+Also, add a description of the dynamic semantics of calls to "implemented by"
+subprograms.
+
+Finally, add legality rules to prohibit primitive operations with matching
+prefixed view profiles.
+
 !wording
 
 Replace the paragraph inserted by AI95-00345 after 6.3.1(24) by:
@@ -53,8 +66,19 @@
 convention as protected operations.
 
 
-Modify the first paragraph added after 8.3(26) by AI-218-3 as follows:
+Add after 6.4(10):
 
+If the name or prefix of a subprogram call denotes an inherited
+subprogram implemented by an entry or protected subprogram (see 9.1 and
+9.4), the subprogram call is equivalent to a call on the underlying entry
+or protected subprogram, with the target object being given by the first
+actual parameter of the call, and the actual parameters of the entry or
+protected subprogram being given by the remaining actual parameters of the
+call, if any.
+
+Modify the first legality paragraph in the 8.3.1 clause added by AI-218-3 as
+follows:
+
 If a subprogram_declaration {other than a protected subprogram},
 abstract_subprogram, ...
 
@@ -68,6 +92,14 @@
 prefixed view profile of inherited subprogram, the inherited subprogram is
 said to be *implemented* by the conforming task entry.
 
+Add after the third paragraph inserted by AI95-00345 after 9.1(9.1/2):
+
+The prefixed view profile of an explicitly declared
+primitive subprogram of a tagged task type shall not be type
+conformant with any entry of the task type, if the first
+parameter of the subprogram is of the task type or is an
+access parameter designating the task type.
+
 Replace the seventh paragraph inserted by AI95-00345 after 9.1(9.1/1) (the second
 bullet) by:
 
@@ -93,6 +125,12 @@
 view profile of the inherited subprogram, the inherited subprogram is said
 to be *implemented* by the conforming protected subprogram or entry.
 
+Add after the third paragraph inserted by AI95-00345 after 9.4(11):
+
+The prefixed view profile of an explicitly declared primitive subprogram of a
+tagged protected type shall not be type conformant with any protected operation
+of the protected type, if the first parameter of the subprogram is of the
+protected type or is an access parameter designating the protected type.
 
 Replace the sixth paragraph inserted by AI95-00345 after 9.4(11) (the second
 bullet) by:
@@ -148,7 +186,14 @@
 AARM Note: An entry family never implements anything, so only *not overriding*
 can be given on the declaration of a family.
 
+Added after 10.1.1(8):
+
+An overriding_indicator is not allowed in a subprogram_declaration,
+generic_instantiation, or subprogram_renaming_declaration which declares a
+library unit.
 
+AARM Note: A library unit can never override anything.
+
 !discussion
 
 The wording for overriding indicators applied to entries and protected
@@ -197,8 +242,27 @@
 profile for a parameterless subprogram. For the purposes of defining subtype
 and mode conformance, the convention of a prefixed view profile is considered
 to match that of either an entry or a protected operation.
+
+!corrigendum 6.4(10)
 
-!corrigendum 8.3(26)
+@dinsa
+For the execution of a subprogram call, the @fa<name> or @fa<prefix> of the
+call is evaluated, and each @fa<parameter_association> is evaluated (see
+6.4.1). If a @fa<default_expression> is used, an implicit
+@fa<parameter_association> is assumed for this rule. These evaluations are done
+in an arbitrary order. The @fa<subprogram_body> is then executed. Finally, if
+the subprogram completes normally, then after it is left, any necessary
+assigning back of formal to actual parameters occurs (see 6.4.1).
+@dinst
+If the @fa<name> or @fa<prefix> of a subprogram call denotes an inherited
+subprogram implemented by an entry or protected subprogram (see 9.1 and
+9.4), the subprogram call is equivalent to a call on the underlying entry
+or protected subprogram, with the target object being given by the first
+actual parameter of the call, and the actual parameters of the entry or
+protected subprogram being given by the remaining actual parameters of the
+call, if any.
+
+!corrigendum 8.3.1(1)
 !comment This is a dummy just to cause a conflict.
 
 @dinsa
@@ -231,6 +295,12 @@
 @fa<task_type_declaration> shall denote a limited interface type that
 is not a protected interface.
 
+The prefixed view profile of an explicitly declared
+primitive subprogram of a tagged task type shall not be type
+conformant with any entry of the task type, if the first
+parameter of the subprogram is of the task type or is an
+access parameter designating the task type.
+
 For each primitive subprogram inherited by the type declared by a
 @fa<task_type_declaration>, at most one of the following shall apply:
 
@@ -276,6 +346,11 @@
 @fa<protected_type_declaration> shall denote a limited interface type that
 is not a task interface.
 
+The prefixed view profile of an explicitly declared primitive subprogram of a
+tagged protected type shall not be type conformant with any protected operation
+of the protected type, if the first parameter of the subprogram is of the
+protected type or is an access parameter designating the protected type.
+
 For each primitive subprogram inherited by the type declared by a
 @fa<protected_type_declaration>, at most one of the following shall apply:
 
@@ -340,6 +415,16 @@
 
 In addition to the places where Legality Rules normally apply (see 12.3), these
 rules also apply in the private part of an instance of a generic unit.
+
+!corrigendum 10.1.1(8)
+
+@dinsa
+@xcode<@fa<parent_unit_name ::= name>>
+@dinst
+An @fa<overriding_indicator> is not allowed in a @fa<subprogram_declaration>,
+@fa<generic_instantiation>, or @fa<subprogram_renaming_declaration> which
+declares a library unit.
+
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent