To: J3 J3/26-198 Subject: US-012/013: Edits for OPERATION argument to REDUCE From: Dan Bonachea Date: 2026-October-14 References: 26-103r3, 26-007r2 1. Background ------------- 26-103r3 added two new prefix reduction intrinsics: REDUCE_PREFIX_{EX,IN}CLUSIVE which appear in subclauses 17.9.{180,181} of 26-007r2. These new subclauses use specification wording for the OPERATION argument that carefully follows the pattern of the existing REDUCE intrinsic specified in 17.9.179. In the course of adding the new subclauses, two minor defects were discovered in the specification of the OPERATION argument to the REDUCE intrinsic: 1. The OPERATION argument to REDUCE should require the function result to be nonallocatable and nonpointer (now CD comment US-012). 2. The OPERATION argument to REDUCE should only recommend mathematical associativity when ORDERED is absent or false (now US-013). These defects were repaired in the analogous wording for the new intrinsics, but remain uncorrected for REDUCE in 26-007r2. This was discussed in J3 plenary on 2026-01-12 and there was informal agreement these oversights in REDUCE should be corrected in subsequent work. This paper provides those corrections to REDUCE, establishing consistency with the OPERATION wording for the new intrinsics. 2. Edits (relative to 26-007r2) -------- ------------------------------------------------------------------------- [515:27-28] 17.9.179 REDUCE, para 3, OPERATION argument Before "nonpolymorphic", insert: "nonallocatable, nonpointer, " Such that the entire sentence reads: "Its result shall be a nonallocatable, nonpointer, nonpolymorphic scalar and have the same declared type and type parameters as ARRAY." ------------------------------------------------------------------------- [515:28-29] 17.9.179 REDUCE, para 3, OPERATION argument Before "OPERATION", insert: "If ORDERED is absent or false, then " Such that the entire sentence reads: "If ORDERED is absent or false, then OPERATION should implement a mathematically associative operation. ===END===