Version 1.1 of acs/ac-00167.txt

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

!standard 12.6(8.5/2)          08-10-06 AC95-00167/01
!class confirmation 08-10-06
!status received no action 08-10-06
!status received 08-06-17
!subject Actual for generic formal abstract subprogram

!topic Actual for generic formal abstract subprogram
!reference 12.6
!from Adam Beneschan 08-06-17

Some possible missing wording:

12.6(8.5) says, "The actual subprogram for a
formal_abstract_subprogram_declaration shall be a dispatching operation of the
controlling type or of the actual type corresponding to the controlling type".

Is this language enough to ensure that an actual of Subp_Ptr.all, where Subp_Ptr
is an object of access-subprogram type, is illegal?

Maybe it's enough, when 3.9.2(2) is taken into account: "A call on a dispatching
operation is a call whose name or prefix denotes a dispatching operation."  This
is worded in a way such that "call on a dispatching operation" excludes any call
through a deference (AARM 3.9.2(2.a)).  But since this wording applies to the
phrase "call on a dispatching operation", which isn't used in the context of
generic instantiation, I'm not sure whether it automatically applies to
12.6(8.5), or whether 12.6(8.5) needs to be reworded slightly to use the same
sort of wording that 3.9.2(2) uses, or should just say flat-out "the actual
can't be a dereference".


From: Randy Brukardt
Date: Saturday, August 9, 2008 12:39 AM

Umm, you aren't reading the right definition. "Dispatching operation" is defined
in 3.9.2(1/2) as the primitive subprograms of a tagged type, the subprograms
declared by a formal_abstract_subprogram_declaration, and the stream attributes
of a specific tagged type that are available. Subp_Ptr.all is none of these,
thus it is illegal. QED.

"Luke... Use the Index!  Use the Index!" :-)


Questions? Ask the ACAA Technical Agent