Version 1.2 of ai05s/ai05-0270-1.txt

Unformatted version of ai05s/ai05-0270-1.txt version 1.2
Other versions for file ai05s/ai05-0270-1.txt

!standard 3.10.2(13/2)          11-11-11 AI05-0270-1/01
!class binding interpretation 11-11-08
!status Amendment 2012 11-11-11
!status ARG Approved 7-0-2 11-11-11
!status work item 11-11-08
!status received 11-09-26
!priority Low
!difficulty Medium
!qualifier Omission
!subject Accessibility of null
!summary
Null has library-level accessibility when passed as the actual of an access parameter.
!question
3.10.2(13/2) says that the accessibility of an access parameter is that of the view designated by the actual. What is the accessibility if that actual is null? (Library-level.)
!recommendation
(See summary.)
!wording
Modify 3.10.2(13/2):
The accessibility level of the anonymous access type of an access parameter specifying an access-to-object type is the same as that of the view designated by the actual{ (or library-level if the actual is null)}.
!discussion
This rule appears to have been designed for the always null-excluding access parameters of Ada 95, and doesn't appear to have updated (for this reason) by Ada 2005.
The fix is intended to be similar to the text in 3.10.2(12.1/2), which solves a similar problem for access discriminants.
!corrigendum 3.10.2(13/2)
Replace the paragraph:
by:
!ACATS Test
An ACATS C-Test should be created (but this is likely to be low priority).
!appendix

From: Steve Baird
Sent: Monday, September 26, 2011  5:24 PM

Randy Brukardt wrote:
> Steve Baird wrote:
>>
>> Should 3.10.2(13/2) handle the case where the actual parameter value 
>> is null?
>>
>> "The view designated by the actual" seems wrong if the actual is null.
> 
> This is an Ada 95 rule, which probably assumed what we now call a null 
> excluding access type.
> 
>> Do we want to ignore this one because it wasn't introduced in Ada2012?
> 
> No, but we want to ignore it because it is completely unclear what the 
> accessibility of an anonymous access parameter that is passed null 
> should be. Some thought is needed, and I'm not going to give it right now.
> 
> Please send this question to Ada-Comment, so we deal with it as an 
> early Ada 2012 AI.

Done.

****************************************************************

Questions? Ask the ACAA Technical Agent