Version 1.5 of ais/ai-00176.txt
!standard 11.05 (11) 99-08-31 AI95-00176/05
!class binding interpretation 97-03-19
!status Corrigendum 2000 99-05-27
!status WG9 approved 98-06-12
!status ARG Approved 11-0-0 98-04-01
!status ARG Approved (with changes) 13-0-0 97-11-16
!status work item 97-03-19
!status received 97-03-19
!priority Low
!difficulty Easy
!qualifier Omission
!subject Access_Check is performed for access discriminants
!summary
The check that an access discriminant is non-null is an Access_Check.
!question
Is the null check that occurs when evaluating a discriminant association
for an access discriminant considered to be an Access_Check?
!recommendation
(See summary.)
!wording
(See summary.)
!discussion
It was an oversight to omit the null check that occurs on discriminant
association for an access discriminant from the list of checks associated
with Access_Check in 11.5(11).
!corrigendum 11.05(11)
Replace the paragraph:
- Access_Check
-
When evaluating a dereference (explicit or
implicit), check that the value of the name is
not null. When passing an actual parameter to a
formal access parameter, check that the value of
the actual parameter is not null.
by:
- Access_Check
-
When evaluating a dereference (explicit or
implicit), check that the value of the name is
not null. When passing an actual parameter to a
formal access parameter, check that the value of
the actual parameter is not null. When evaluating a
discriminant_association for an access discriminant,
check that the value of the discriminant is not null.
!ACATS test
This AI applies to pragma Suppress. However, since pragma Suppress need not
actually have any effect (see the note 11.5(29)), it is not testable.
!appendix
!section 11.5(11)
!subject Access_Check is performed for access discriminants
!reference RM95-11.5(11)
!from Norman Cohen
!reference 96-5781.a Norman H. Cohen 96-12-20>>
!discussion
RM 11.5(11) purports to list the circumstances under which an Access_Check
is performed, but omits the check performed during elaboration of a
discriminant constraint that the discriminant value is not null.
(It follows from 3.7.1(12) that the elaboration of a discriminant
constraint entails conversion of each value in the constraint to the
corresponding discriminant subtype, and it follows from 4.6(49) that
conversion to an anonymous access type entails a check that the operand
value is not null.)
****************************************************************
Questions? Ask the ACAA Technical Agent