(j3.2006) VOLATILE or ASYNCHRONOUS function results ??

Van Snyder Van.Snyder
Tue Jan 10 14:10:10 EST 2017


On Tue, 2017-01-10 at 14:16 +0000, Bill Long wrote:
> So, the value returned by the function as the result is disconnected
> from the value of the internal result variable?   Otherwise, I have to
> assume that it is the programmer?s fault if he/she  externally changes
> the value in the memory location used by the result variable between
> the end of the function execution and the point where the result value
> is consumed (Note 15.40 in 17-007). 
> 
> I?m happy to have the compiler just allow VOLATILE for the result
> variable, and let the users shoot themselves in the foot if they are
> so inclined.

I don't see how this is different from the end of a BLOCK construct in
which a variable has the VOLATILE attribute, but it doesn't have it
outside the block.





More information about the J3 mailing list