(j3.2006) does move_alloc violate restrictions in 12.5.2.13?
Robert Corbett
Robert.Corbett
Thu Oct 29 21:10:55 EDT 2009
Jim Xia wrote:
>
> OK, seems most people are going for the "intrinsics are special" rule.
While I agree that intrinsics can be special, I would expect the
standard to call out the cases where they are. As I explained in my
previous response (copied below), I think MOVE_ALLOC is
subject to the usual rules.
Bob Corbett
------------------------------------------------------------------------
Jim Xia wrote:
>
> MOVE_ALLOC (FROM, TO)
>
> moves allocation status from "FROM" to "TO". During the process the
actual object associated with "FROM" is moved to "TO". Doesn't this
violate the rule in (2) on page 301?
I don't think there is a problem. The "entities" in this case are the
dummy arguments TO and FROM and the entities associated with them.
The allocation status of TO and and FROM change, but the dummy argument
TO and the entities associated with it are referenced only through the
dummy argument TO, and the dummy argument FROM and the entities
associated with it are referenced only through the dummy argument FROM.
An object is referenced whrn it appears in a context that requires its
value (see paragraph 2 on page 117). The intrinsic subroutine
MOVE_ALLOC does not require the value of the allocated objects that
might be allocated to TO and FROM. Therefore, an implementation of
MOVE_ALLOC does not need to reference either of the possible
allocated objects.
The one case that does appear to be captured by the rule you cited is
if the dummy arguments TO and FROM are associated with the same entity.
That should be prohibited, and it is.
More information about the J3
mailing list