(j3.2006) Wednesday papers

Van Snyder van.snyder
Thu Oct 17 02:18:44 EDT 2013

On Thu, 2013-10-17 at 15:01 +0900, Malcolm Cohen wrote:
> <<<
> 13-298r2:
> Something should be said in a note about the possibility that B(n+n)
> might produce an array of a different size from B(2*n), or that B(n+n)
> might always produce the same size array as B(2*n) even if N changes
> rapidly but the processor does the permitted transformation of replacing
> n+n by 2*n.
> >>>
> I disagree we need any new note - there is nothing here that is not 
> fundamental to the very concept of volatile.  Whether the expression 
> containing the volatile reference(s) is used as an array bound, an actual 
> arg, a selector, or the right-hand-side of an assignment, etc., it is 
> already documented that the value of that variable (and therefore the value 
> of the expression) might change between references.

I agree, almost.  A case I neglected to propose is the case of B(2*n).
The processor is free to replace that with B(n+n), maybe because it
decides add is cheaper than multiply.  B(2*n) ought to have a size
that's even, but B(n+n) might not.

> <<<
> 13-312r3:
> I have a slight preference for an alternative wording for C583a:
> C583a If IMPLICIT NONE with an <implicit-none-spec> of EXTERNAL appears
>            within a scoping unit, a procedure referenced in that scoping
> unit or
>            in a contained subprogram or BLOCK construct shall be explicitly
>            declared to have the EXTERNAL attribute or shall have
> explicit interface.
> >>>
> There are zero ways of giving an external or dummy procedure an explicit 
> interface without simultaneously giving it the EXTERNAL attribute, so this 
> boils down to what we have now.

I think this one is a tiny bit fewer words, but my original motivation
was not to say something like "an external procedure shall have the
EXTERNAL attribute."  We understand that, but a reader of the standard
who doesn't know it as well as we do might find it confusing.

More information about the J3 mailing list