J3/02-316 Date: November 12, 2002 To: J3 From: Rob James Subject: Volatile pointers The treatment of pointers with the VOLATILE attribute is not quite correct. Currently, if the VOLATILE attribute is specified for a pointer, the volatility only applies to the pointer association, not to the target. Note 5.25 incorrectly asserts that, since the current pointer value needs to be loaded when the target is accessed through the pointer, the processor must access the target by dereferencing the pointer. In fact, the processor could have both the pointer value and the target stored in registers. The current pointer value could be loaded and compared to the one in the register, and if the two values are equal, the register value of the target could be used, rather than loading the target from memory. This is obviously not desired, but neither is the previous behaviour, where the target is treated as volatile at all times, not just when accessed through the pointer. The proposed edit below fixes this situation. Proposed Edit: -------------- [83:10] After "association", add "and to the target when it is accessed through the pointer". [83:11-] Delete Note 5.25.