07-269R2
To: J3
From: Dick Hendrickson
Subject: Interpretation: Clause 16 and volatile variables
Date: 2007 August 9
NUMBER: F03/0099
TITLE: Clause 16 does not account for volatile variable
KEYWORDS: volatile, defined, undefined
DEFECT TYPE: Erratum
STATUS: J3 consideration in progress
QUESTION:
Should the various lists in clause 16 that describe definition and
association be modified to include the effects of volatile variables?
In particular, 16.4.2.1.1 through 16.4.2.1.2 do not mention the fact
that pointer association status can be volatile and change by other
means.
16.5.4 says "all other variables are initially undefined.? Can a
volatile variable be initially defined by other means?
16.5 (26) says volatile variables "become defined", but they also can
become undefined, by other means.
Allocatable volatile variables can become allocated or unallocated by
other means also.
ANSWER:
Yes, the lists in clause 16 should be modified to include the effects of
volatility. In addition, the effects of volatile on pointer objects
are not completely specified in clause 5. The effect on allocatable
objects is not complete in clause 6.
EDITS:
[85:10] In the paragraph between note 5.21 and note 5.22, change
"association status and array bounds" to "association status, dynamic
type and type parameters, and array bounds"
[113:21+] Add a new paragraph at the end of 6.3.1.1
"The allocation status of an object with the VOLATILE attribute may
change by means not specified by the program."
[415:27] Add a new paragraph at the end of 16.4.2.1.4
"When a pointer object with the VOLATILE attribute is changed by a means
not specified by the program it may become defined or undefined. In
addition, its array bounds and association status may change. If it is
polymorphic, its dynamic type and type parameters may change."
[421:42-43] 16.5.5 Replace list item (26) with as text, not a list item
"In addition, an object with the VOLATILE attribute (5.1.2.16) might become defined by a means not specified by the program."
[423:28+] 16.5.6 insert as text after the last list item
"In addition, an object with the VOLATILE attribute (5.1.2.16) might become undefined by a means not specified by the program."
SUBMITTED BY: Dick Hendrickson
HISTORY: 07-269 m181 F03/00xx Submitted
07-269R1 m181 Draft answer