Version 1.1 of acs/ac-00244.txt

Unformatted version of acs/ac-00244.txt version 1.1
Other versions for file acs/ac-00244.txt

!standard 3.10.2(13.2/3)          13-01-14 AC95-00244/00
!standard 3.10.2(19.1/3)
!class Amendment 13-01-14
!status received no action 13-01-14
!status received 12-09-07
!subject Stand-along objects of anonymous access-to-subprogram types
!summary
!appendix

From: Tucker Taft
Sent: Friday, September  7, 2012  11:39 AM

Thanks to a customer test case, we just bumped into a potential bug in the Ada
2012 manual.  AI05-148 changed the rules for stand-alone objects of an anonymous
access type so that they "remember" the accessibility level of the last
assignment.  In the text of the AI, it just talks about "anonymous access type,"
but in the actual wording it shifts to "anonymous access-to-object type." Do we
think that shift was intentional?  If so, then is the rule for anonymous
access-to-subp types the same as it was in Ada 2005, namely they are statically
determined by the point of the declaration of the stand-alone object?  (And is
there a good reason to make the distinction?)

And by the way, is the Ada 2005 rule for stand-alone objects of an anonymous
access type just a ramification of the general rule in 3.10.2(7/3), which
defines the accessibility level for named access type declarations?

In either case, the wording which says 3.10.2(7/3) applies in general, "except
in the cases of renaming and derived access types described below" should also
mention stand-alone objects of an anonymous access[-to-object] type as an
exception.

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

From: Steve Baird
Sent: Friday, September  7, 2012  11:50 AM

>  In the text of the AI, it
> just talks about "anonymous access type," but in the actual wording it
> shifts to "anonymous access-to-object type."
> Do we think that shift was intentional?

My recollection is that it was intentional.

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

From: Steve Baird
Sent: Friday, September  7, 2012  12:44 PM

The discussion section of the AI says:

   Note that we have not chosen to include access-to-subprogram types in
   this change. They remain as in Ada 2005, with stand-alone objects
   being of local accessibility. There seems little need for the dynamic
   flexibility we are proposing here for access-to-object types, because
   access-to-subprogram parameters are not dynamic.

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

Questions? Ask the ACAA Technical Agent