12-104r2 To: J3 Subject: Interpretation concerning pure procedures in intrinsic modules From: Van Snyder Date: 2012 February 14 Several procedures in IEEE_Arithmetic are specified to be pure, but the definition of purity in 12.7p1 does not admit the possibility that procedures that are neither intrinsic nor defined by pure subprograms can be pure. Several procedures in ISO_Fortran_Env and ISO_C_Binding are not specified to be pure, but there appears not to be any reason for them to be impure. ---------------------------------------------------------------------- NUMBER: F08/0065 TITLE: Should certain procedures in intrinsic modules be pure? KEYWORDS: pure, intrinsic, intrinsic module DEFECT TYPE: Erratum STATUS: Under J3 consideration QUESTION: 1. 12.7 doesn't allow a procedure in an intrinsic module to be pure unless it's actually defined by a pure subprogram (as opposed to being provided by the processor). Nonetheless, some of the procedures in IEEE_Arithmetic are specified to be pure. How can they be pure? 2. The COMPILER_OPTIONS and COMPILER_VERSION functions in the intrinsic module ISO_Fortran_env are not described as being pure, but there is no apparent reason for any of them to be impure. Were they intended to be pure? 3. The procedures in ISO_C_Binding are not specified to be pure, but there is no apparent reason for any of them to be impure. Were they intended to be pure? ANSWER: 1. The list in subclause 12.7, paragraph 1, is incomplete. An edit is supplied to correct it. 2. The procedures were intended to be pure. An edit is supplied to correct this oversight. 3. The procedures were intended to be pure. An edit is supplied to correct this oversight. EDITS: 1: [12.7p1 312:12+] Insert a list item " o a module procedure in an intrinsic module, if it is specified to be pure," 2: [13.8.2.1p2 397:7] Append a sentence to the paragraph: "The module procedures described in 13.8.2 are pure." 3: [15.2.3.1p1 426:15] Append a sentence to the paragraph: "The module procedures described in 15.2.3 are pure." SUBMITTED BY: Van Snyder HISTORY: 12-104 m197 F08/0065 submitted 12-104r1 m197 Revised 12-104r2 m197 Revised