CVS difference for ais/ai-00145.txt
--- ais/ai-00145.txt 1998/09/30 00:17:25 1.1
+++ ais/ai-00145.txt 1999/07/28 00:08:44 1.2
@@ -1,4 +1,4 @@
-!standard 03.05 (15) 96-11-16 AI95-00145/02
+!standard 03.05 (15) 99-07-27 AI95-00145/03
!reference RM95 3.5.1(10)
!reference RM95 3.5.4(9-10)
!reference RM95 3.5.9(13)
@@ -13,6 +13,7 @@
!reference RM95 4.5.6(2)
!reference RM95 A.1(7)
!reference RM95 A.1(15)
+!status Corrigendum 2000 99-07-27
!class binding interpretation 96-10-07
!status WG9 approved 96-12-07
!status ARG Approved (subject to editorial review) 7-0-3 96-10-07
@@ -23,14 +24,14 @@
!difficulty Hard
!subject Profile of predefined operators for scalar types
-!summary 96-10-07
+!summary
The italicized T shown in the definitions of predefined operators means:
- T'Base, for scalars
-
+
- the first subtype, for tagged types
-
+
- the type without any constraint, in other cases
The definitions of the operators in chapter 4 take precedence over those
@@ -43,7 +44,7 @@
profile of such a renaming-as-body must instead be mode conformant with
that of the renamed callable entity.
-!question 96-09-08
+!question
4.5.2(8-9) says:
@@ -63,9 +64,17 @@
function "<" (Left, Right : Boolean) return Boolean; -- A.1(7)
function "<" (Left, Right : Integer'Base) return Boolean; -- A.1(15)
+
+!recommendation
+
+(See summary.)
+
+!wording
-!response 96-09-08
+(See summary.)
+!discussion
+
Consider:
type T1 is range ...;
@@ -109,7 +118,7 @@
type T is new Integer'Base;
end P;
use P;
-
+
function Equals(X, Y: T) return Boolean;
function Equals(X, Y: T) return Boolean renames "=";
@@ -121,8 +130,67 @@
appear before the subprogram is frozen. Note that after the subprogram
is frozen, one cannot use a renaming-as-body for a predefined operator,
because it is intrinsic.
+
+!corrigendum 8.05.04(05)
+
+@drepl
+The profile of a renaming-as-body shall be subtype-conformant with that
+of the renamed callable entity, and shall conform fully to that of the
+declaration it completes. If the renaming-as-body completes that declaration
+before the subprogram it declares is frozen, the subprogram it declares takes
+its convention from the renamed subprogram; otherwise the convention of the
+renamed subprogram shall not be Intrinsic.
+@dby
+The profile of a renaming-as-body shall conform fully to that of the
+declaration it completes. If the renaming-as-body completes that
+declaration before the subprogram it declares is frozen, the profile
+shall be mode-conformant with that of the renamed callable entity
+and the subprogram it declares takes its convention from the renamed
+subprogram; otherwise the profile shall be subtype-conformant with
+that of the renamed callable entity and the convention of the
+renamed subprogram shall not be Intrinsic.
+
+!corrigendum A.01(7)
+
+@drepl
+@xcode< -- @b<function> "=" (Left, Right : Boolean) @b<@b<return>> Boolean;
+ -- @b<function> "/=" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "<" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "<=" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "@>" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "@>=" (Left, Right : Boolean) @b<return> Boolean;>
+@dby
+@xcode< -- @b<function> "=" (Left, Right : Boolean'Base) @b<return> Boolean;
+ -- @b<function> "/=" (Left, Right : Boolean'Base) @b<return> Boolean;
+ -- @b<function> "<" (Left, Right : Boolean'Base) @b<return> Boolean;
+ -- @b<function> "<=" (Left, Right : Boolean'Base) @b<return> Boolean;
+ -- @b<function> "@>" (Left, Right : Boolean'Base) @b<return> Boolean;
+ -- @b<function> "@>=" (Left, Right : Boolean'Base) @b<return> Boolean;>
+
+!corrigendum A.01(9)
+
+@drepl
+@xcode< -- @b<function> "and" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "or" (Left, Right : Boolean) @b<return> Boolean;
+ -- @b<function> "xor" (Left, Right : Boolean) @b<return> Boolean;>
+@dby
+@xcode< -- @b<function> "and" (Left, Right : Boolean'Base) @b<return> Boolean'Base;
+ -- @b<function> "or" (Left, Right : Boolean'Base) @b<return> Boolean'Base;
+ -- @b<function> "xor" (Left, Right : Boolean'Base) @b<return> Boolean'Base;>
+
+!corrigendum A.01(10)
+
+@drepl
+@xcode< -- @b<function> "not" (Right : Boolean) @b<return> Boolean;>
+@dby
+@xcode< -- @b<function> "not" (Right : Boolean'Base) @b<return> Boolean'Base;>
+
+!ACATS test
+
+Construct a C-Test to check that renaming examples given here are legal and
+work as expected.
-!appendix 96-09-10
+!appendix
!section 3.5(15)
!subject Profile of predefined operators for scalar types
Questions? Ask the ACAA Technical Agent