The old volatile discussions with Thaddy...
In my understanding:
Volatile guarantees that the variable accesses in statements are not optimized to registers etc. In fpc there was no such concept (I heard it was introduced lately), so all non local variables have to be dealt as volatile, especially in multithreading applications. A prominent example where "volatility" is needed is the TThreat.Terminated property (boolean). A strong optimization of the loop
while not terminated do
should recognize that it isn't modified within the loop, so for a non-volatile "terminated" it could be optimized to
if not terminated do
Of course this would break the code. In case of fpc the volatility is implizit, as said, all non local variables are volatile. But this prevents such optimizations for all variables, also those, that don't need volatile behaviour.
I see a problem in the introduction of a volatile keyword, the backward compatibility. The keyword only makes sense, if optimizations are implemented, that recognize the keyword. If this is the case than old code with the missing keyword gets broken.
@TE: This means in fpc you can just leave the [volatile] away.