CVS difference for ais/ai-00110.txt

Differences between 1.1 and version 1.2
Log of other versions for file ais/ai-00110.txt

--- ais/ai-00110.txt	1998/09/30 00:17:19	1.1
+++ ais/ai-00110.txt	1999/07/21 03:10:57	1.2
@@ -1,4 +1,4 @@
-!standard 06.04.01 (13)                               96-11-16  AI95-00110/03
+!standard 06.04.01 (13)                               99-05-27  AI95-00110/04
 !class confirmation 96-04-04
 !status WG9 approved 96-12-07
 !status ARG approved 12-0-0  96-10-07
@@ -9,12 +9,12 @@
 !difficulty Medium
 !subject No Constraint Check on 'out' Parameter of an Access Type
 
-!summary 96-04-04
+!summary
 
 For a parameter of mode 'out', of an access type, there is no constraint
 check before the call.
 
-!question 96-10-07
+!question
 
 AARM-6.4.1 says:
 
@@ -48,7 +48,7 @@
 Given the current rules, the only reasonable value for Param'Length
 is 5.
 
-!response 96-04-04
+!response
 
 For a parameter of mode 'out', of an access type, there is no
 constraint check before the call.  This implies that inside the
@@ -65,8 +65,13 @@
 procedure, and the uninitialized value does not necessarily obey the
 constraint.
 
-!appendix 96-04-04
+!ACATS test
 
+ACATS test C64103F.ADA tests that an 'out' parameter of an access type does
+not raise Constraint_Error.
+
+!appendix
+
 !section 6.4.1(12)
 !subject No constraint check on out parameter of an access type?
 !reference AARM95-6.4.1(12,13,13.a)
@@ -95,12 +100,12 @@
       type Pointer is access String;
       P: Pointer := new String'("hello");
       subtype Pointer_10 is Pointer(1 .. 10);
-    
+
       procedure Proc(Param: out Pointer_10) is
       begin
          Put_Line("Param'Length = " & Integer'Image(Param'Length));
       end Proc;
-    
+
    begin
       Proc(P);
    end Foo;
@@ -127,7 +132,7 @@
 !discussion
 
 > In 6.4.1, we read the following:
-> 
+>
 > >   12  For an out parameter that is passed by copy, the formal parameter
 > >       object is created, and:
 > >
@@ -137,32 +142,32 @@
 > > 13.a   Reason:  This preserves the Language Design Principle that an
 > >        object of an access type is always initialized with a
 > >        ``reasonable'' value.
-> 
+>
 > Noting that out parameters are readable in Ada 95, what should be the
 > output of the following program?
-> 
+>
 >    with Ada.Text_IO; use Ada.Text_IO;
 >    procedure Foo is
 >       type Pointer is access String;
 >       P: Pointer := new String'("hello");
 >       subtype Pointer_10 is Pointer(1 .. 10);
->     
+>
 >       procedure Proc(Param: out Pointer_10) is
 >       begin
 >        Put_Line("Param'Length = " & Integer'Image(Param'Length));
 >       end Proc;
->     
+>
 >    begin
 >       Proc(P);
 >    end Foo;
-> 
+>
 > Given the current rules, the only reasonable value for Param'Length is
 > 5, but it shouldn't be this easy to create an object whose value doesn't
 > satisfy its declared subtype.  This would also contradict the statement
 > of AARM95-6.2(13.a) that "An out parameter is treated like a declared
 > variable without an explicit initial expression.", though it's probably
 > ok for that statement not to apply to access type parameters.
-> 
+>
 > I suggest that a constraint check is needed, and that the call should
 > raise Constraint_Error.
 
@@ -171,11 +176,11 @@
 
 In general in Ada 95, a compiler needs to recognize the notion of
 an object having an "unreliable" subtype.  This is the case with
-an uninitialized scalar variable -- the compiler can't necessarily 
-believe the declared subtype, though it must still check against it on 
+an uninitialized scalar variable -- the compiler can't necessarily
+believe the declared subtype, though it must still check against it on
 any assignment to the variable.
 
-For an OUT parameter of a constrained access subtype, the compiler 
+For an OUT parameter of a constrained access subtype, the compiler
 cannot believe the declared subtype, until it knows the OUT parameter
 has been assigned to inside the subprogram.
 

Questions? Ask the ACAA Technical Agent