Version 1.1 of ai05s/ai05-0062-1.txt

Unformatted version of ai05s/ai05-0062-1.txt version 1.1
Other versions for file ai05s/ai05-0062-1.txt

!standard 7.4(6/2)          07-08-21 AI05-0062-1/01
!standard 7.4(7.1/2)
!class binding interpretation 07-08-21
!status work item 07-08-21
!status received 07-08-21
!priority Low
!difficulty Easy
!qualifier Error
!subject Null exclusions and deferred constants
A full constant for a deferred constant that does not have a null exclusion may in fact has such an exclusion.
ACATS 3.0 test B740002 has the following example:
package B740002 is
type Priv_Comp is private;
type Acc_to_Priv is access all Priv_Comp;
Cnst_Priv_22 : constant Acc_to_Priv;
Cnst_Priv_22 : constant not null Acc_to_Priv; -- OK
end B740002;
The test writer thought that this constant was legal based on the wording of 7.4(7.1/2) [which is reinforced by AARM note 7.4(7.a.1/2)], which is asymetrical.
However, a compiler writer was pointed out that 7.4(6/2) requires that the subtype_indications statically match, and that the subtype_indications include the null_exclusion. Note that this is different than renames and parameters, where the null_exclusion is separate from the subtype_mark, and thus matching only applies to that subtype_mark.
What is the indent here?
(See Summary.)
In 7.4(6/2), change
...then the {constraint}[subtype] defined by the subtype_indication in the full declaration shall match it statically. ...
The net effect of the current rules is that the static matching requirement of 7.4(6/2) makes 7.4(7.1/2) completely redundant and unnecessary. Thus, the easiet fix is to delete 7.4(7.1/2).
However, it is clear that it was intended that the explicit null_exclusions would not have to match (as is the case for other cases, like renames). This also would be consistent with the handling of unconstrained subtypes. Thus, we chose to adjust 7.4(6/2).
!corrigendum 7.4(6/2)
Replace the paragraph:
Replace this case in the ACATS B-Test B740002.


Questions? Ask the ACAA Technical Agent