CVS difference for ais/ai-00412.txt

Differences between 1.3 and version 1.4
Log of other versions for file ais/ai-00412.txt

--- ais/ai-00412.txt	2005/02/08 07:12:41	1.3
+++ ais/ai-00412.txt	2005/04/13 05:37:23	1.4
@@ -1,5 +1,12 @@
-!standard 3.10.1(6)                                   05-02-07  AI95-00412/02
+!standard 3.10.1(2)                                   05-03-21  AI95-00412/04
+!standard 3.10.1(7)
+!standard 8.3(20)
+!standard 8.5.3(3)
+!standard 8.5.3(4)
+!standard 10.1.2(8)
 !class amendment 05-02-03
+!status Amendment 200Y 05-02-28
+!status ARG Approved 5-0-5  05-02-12
 !status work item 05-02-03
 !status received 05-02-03
 !priority Medium
@@ -80,7 +87,7 @@
 
 !wording
 
-Add after 3.10.1(2.5/2):
+Add after the paragraphs added by AI-326 to 3.10.1(2):
 
  Similarly, if a subtype_mark denotes a subtype_declaration defining
  a subtype of an incomplete view T, the subtype_mark denotes an
@@ -106,8 +113,8 @@
     is hidden from all visibility within the declarative region of the
     package, as well as within the scope of any nonlimited_with_clause
     that mentions it. {Where the declaration of the limited view of a
-    package is visible, all views of the package are limited, including
-    those provided by a package renaming.}
+    package is visible, any name that denotes the package denotes the
+    limited viewRedundant:[, including those provided by a package renaming.]}
 
  *
     Redundant:[For each declaration or renaming of a generic unit as a
@@ -120,11 +127,11 @@
 Drop the restriction of 8.5.3(3/2) that requires the
 view be nonlimited. Instead, add the following:
 
-  If the package_name denotes a limited view of a package, then the
-  package_renaming_declaration shall not be referenced outside its
-  immediate scope, except within the scope of a with_clause
-  that mentions the package or (for a nested package) the
-  nearest enclosing library package.
+  If the package_name of a package_renaming_declaration denotes a limited view
+  of a package P, then a name that denotes the package_renaming_declaration
+  shall occur only within the immediate scope of the renaming or the
+  scope of a with_clause that mentions the package P or (if P is a nested
+  package) the nearest library package enclosing P.
 
 Add after 8.5.3(4):
 
@@ -132,7 +139,22 @@
   package is visible, a name that denotes the package_renaming_declaration
   denotes a limited view of the package (see 10.1.1).]
 
+  AARM Note: Proof: This rule is found in 8.3, Visibility.
 
+Replace the second paragraph added after 10.1.2(8) by AI-217-6 with:
+
+A limited_with_clause shall not appear on a library_unit_body, subunit, or
+library_unit_renaming_declaration.
+
+  AARM Reason: We don't allow a limited_with_clause on a
+  library_unit_renaming_declaration because it would be useless. A renaming
+  could not appear in a limited_with_clause (by the rule above), and a renaming
+  could not appear in a nonlimited_with_clause (because the name would not be
+  within the scope of a with_clause denoting the package, see 8.5.3). Nor could
+  it be a parent of another unit. That doesn't leave anywhere that that
+  the name of such a renaming *could* appear.
+
+
 !discussion
 
 The canonical example of limited with clauses is
@@ -408,6 +430,22 @@
 units that are part of the circularity. But you never have to add a
 "with" clause on units *outside* the circularity.
 
+The problem with this approach is that Ada is an explicit language; implicit
+things are kept to a minimum. Implicit dependencies are bad for both
+implementers and maintenance programmers. Maintenance programmers are faced
+with operations that are mysteriously available, and it may take looking in
+a number of units to find their declarations - they could only be found by
+tracing back a chain of declarations. Moreover, changes in a unit could
+possibly affect some code that does not explicitly mention the unit, which
+is likely to be confusing. Implementations are complicated by
+implicit dependencies; many implementations find the declarations to load
+based on the explicit list of dependencies given in the context clause;
+anything that requires items to be made available later could be very hard
+to add. The existing case if implicit dependence doesn't suffer from these
+problems because Address is a magic attribute anyway, and no one
+is giving to be surprised where it is declared. Therefore, we reject any
+approach that requires implicit dependencies.
+
 BOTTOM LINE:
 
 We propose to allow subtype-of-incomplete and renaming limited views.
@@ -428,8 +466,89 @@
 !example
 
 (See discussion.)
+
+!corrigendum 3.10.1(2)
 
---!corrigendum 02.09(2)
+@dinsa
+@xcode<@fa<incomplete_type_declaration ::= >@ft<@b<type>>@fa< defining_identifier [discriminant_part];>>
+@dinsa
+Similarly, if a @fa<subtype_mark> denotes a @fa<subtype_declaration> defining
+a subtype of an incomplete view @i<T>, the @fa<subtype_mark> denotes an
+incomplete view except under the same two circumstances given above,
+in which case it denotes the full view of @i<T>.
+
+!corrigendum 3.10.1(7)
+
+@drepl
+@xbullet<as the @fa<subtype_mark> defining the subtype of a parameter or
+result of an @fa<access_to_subprogram_definition>;>
+@dby
+@xbullet<as the @fa<subtype_mark> in the @fa<subtype_indication> of a
+@fa<subtype_declaration>; the @fa<subtype_indication> shall not have a
+@fa<null_exclusion> or a @fa<constraint>;>
+
+
+!corrigendum 8.3(20)
+
+@drepl
+@xbullet<The declaration of a library unit (including a
+@fa<library_unit_renaming_declaration>) is hidden from all visibility except at
+places that are within its declarative region or within the scope of a
+@fa<with_clause> that mentions it. For each declaration or renaming of a generic
+unit as a child of some parent generic package, there is a corresponding
+declaration nested immediately within each instance of the parent. Such a
+nested declaration is hidden from all visibility except at places that are
+within the scope of a @fa<with_clause> that mentions the child.>
+@dby
+@xbullet<The declaration of a library unit (including a
+@fa<library_unit_renaming_declaration>) is hidden from all visibility at
+places outside its declarative region that are not within the scope of a
+@fa<nonlimited_with_clause> that mentions it. The limited view of a library
+package is hidden from all visibility at places that are not within the scope
+of a @fa<limited_with_clause> that mentions it; in addition, the limited view
+is hidden from all visibility within the declarative region of the package, as
+well as within the scope of any @fa<nonlimited_with_clause> that mentions it.
+Where the declaration of the limited view of a
+package is visible, any name that denotes the package denotes the
+limited view, including those provided by a package renaming.>
+
+@xbullet<For each declaration or renaming of a generic unit as a child of some
+parent generic package, there is a corresponding declaration nested immediately
+within each instance of the parent. Such a nested declaration is hidden from
+all visibility except at places that are within the scope of a @fa<with_clause>
+that mentions the child.>
+
+!corrigendum 8.5.3(3)
+
+@dinsa
+The renamed entity shall be a package.
+@dinst
+If the @i<package_>@fa<name> of a @fa<package_renaming_declaration> denotes a
+limited view of a package @i<P>, then a name that denotes the
+@fa<package_renaming_declaration> shall occur only within the immediate scope
+of the renaming or the scope of a @fa<with_clause> that mentions the package
+@i<P> or (if @i<P> is a nested package) the nearest library package enclosing
+@i<P>.
+
+!corrigendum 8.5.3(4)
+
+@dinsa
+A @fa<package_renaming_declaration> declares a new view of the renamed package.
+@dinst
+At places where the declaration of the limited view of the renamed package is
+visible, a @fa<name> that denotes the @fa<package_renaming_declaration> denotes
+a limited view of the package (see 10.1.1).
+
+!corrigendum 10.1.2(8)
+!comment This is a fake just to force a conflict. The conflict file includes
+!comment the change.
+
+@drepl
+A @fa<limited_with_clause> shall not appear on a @fa<library_unit_body> or
+@fa<subunit>.
+@dby
+A @fa<limited_with_clause> shall not appear on a @fa<library_unit_body>,
+@fa<subunit>, or @fa<library_unit_renaming_declaration>.
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent