To: J3 Members J3/16-261
From: Van Snyder
Subject: Comments on Clause 10
References: 16-007r2
Date: 2016 September 28
1. Edits
--------
[151:2 10.1.3p1] Replace "extension" with "defined" because neither
"extension operation" nor "extension operator" is a term that exists
anywhere other than here and in the index (which refers only to here).
[151:5 10.1.3p2] Replace "a defined" with "an" because the precedence of
any operation depends upon the precedence of its operator.
[153:14+4 NOTE 10.13] Before "produces" insert "where A and B are both
arrays of the same shape"
[155:19 10.1.5.2.4p1] Replace "real power" with "power of type real" for
consistency with the first part of the sentence.
[157:8 10.1.5.3.1p3] "$x_1$ concatenated on the right" could be
perversely read to be the opposite of what we intend. Replace "right"
with left" and after $x_2$ insert "on the right,".
[161:15 10.1.7p2] Append a sentence "If execution of that function could
have resulted in the change in allocation or pointer association status
of any entity, the allocation status of such an entity is processor
dependent, and the pointer association status is undefined."
[523:21 Annex A] Insert a list item:
" o the allocation status of an entity that might have been changed by
execution of a function that is not executed because the processor
determines that its result is not necessary to evaluate an
expression (10.1.7);"
[162:28 10.1.9.2p1] After "array constructor," insert "the primary is an
array and".
[162:32 10.1.9.2p1] Before "If it is" insert "If it is a complex part
designator (9.4.4) its type is real and it has the same kind, rank, and
shape as the ."
[163:5 10.1.9.2p4] Delete "declared to be". After "pointer" insert ",
as an actual argument to an intrinsic inquiry function, as an actual
argument to an inquiry function from the intrinsic modules
IEEE_ARITHMETIC or IEEE_EXCEPTIONS (17.10), an actual argument to the
C_SIZEOF function from the intrinsic module ISO_C_BINDING".
[172:28+5 NOTE 10.44] Replace "will be" with "is".
[175:0+5 NOTE 10.47] After "some reason" insert ", for example to
compute the trace".
[175:0+16 last line of NOTE 10.47] Replace "Linear" with "Rank-1".
2. Integer division
-------------------
The quotient of an integer division is an integer. For positive
dividend and divisor, it is the number of times that the divisor can be
subtracted from the dividend without the result becoming negative. The
"number of times" is necessarily an integer. With a bit of gynmastics,
this can be extended to signed division. The magnitude of the result is
in fact the quotient of the absolute values of the divisor and
divident. The remainder is discarded.
[155:9-13 10.1.5.2.2p1] Replace "mathematical quotient" with "result of
mathematical division". Replace "The result of such ... inclusively"
with "If the division operation is $x/y$, where $x$ is the first operand
and $y$ is the second operand, the magnitude of the result is $q$ where
$|q| \times |y| + r = |x|$, with $0 \leq r < |y|$, and the sign of $q$
is the sign of $x \times y$. The second operand, $y$, shall not be
zero."
3. "Mathematical equivalence" rule
----------------------------------
10.1.3p3 states that the general form of an expression establishes a
precedence among operators in the same syntactic class. NOTE 10.9
states, for example, that if a containing two or more
binary operations + or -, each operand is combined from left to right.
This contradicts the discussions of evaluation of intrinsic operations,
e.g. 10.1.5.2.4p2, wherein one sees, e.g., "Once the interpretation of a
numeric intrinsic operation is established, the processor may evaluate
any mathematically equivalent epxression...." The examples in NOTE
10.18 contradict 10.1.3p3 and NOTE 10.9. I think we want to retain the
"mathematical equivalence" rule.
[151:7-8 10.1.3p3] Replace " order ... determining the" with
"mathematical".
4. Questions without answers
----------------------------
[10.2.2.3 somewhere] Do we need to say that deferred type parameter
values of a pointer object are undefined if the pointer association
status of the target is undefined? 16-260 does this in a note, with a
remark to the reader of a hope that it's normative somewhere.
[179:2-6 10.2.4.2p5] Does this paragraph admit the kinds of race
conditions that result in the description of the DO CONCURRENT construct
specifying that certain things become undefined, or the restrictions
thereon specify that certain things shall not be referenced in a
different iteration? The remainder of subclause 10.2.4.2 seems not to
admit these problems.
5. FORALL statement is still useful
-----------------------------------
Are we preparing to throw out the baby with the bath water by making the
FORALL statement obsolescent? By extending the argument that it's
functionally equivalent to a DO CONCURRENT construct, perhaps we should
also make the IF statement obsolescent. Or create a DO CONCURRENT
statement that's not a construct, similar to the FORALL statement and IF
statement.