To: J3 08-284r1 From: Malcolm Cohen Subject: Interpretation re pure procedures and VOLATILE Date: 2008 November 19 NUMBER: F03/0126 TITLE: References to VOLATILE variables in pure procedures KEYWORDS: VOLATILE, PURE DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Was it intended to allow a VOLATILE variable to be referenced in a pure procedure? ANSWER: No. It was intended that the result of invoking a pure function in a FORALL assignment statement should never depend on the order in which the invocations are executed, see NOTE 12.44. The value of a variable with the VOLATILE attribute might change between invocations of the function in ways incompatible with this design. EDIT: [286:22+] In 12.6, Pure procedures, add a new constraint: "C1271a The of a variable with the VOLATILE attribute shall not appear in a pure subprogram." SUBMITTED BY: John Reid and Bill Long. HISTORY: 08-284 m186 Submitted in response to N1745 by Nick Maclaren noting the problem. 08-284r1 m186 Revised. ===END===