Quote Originally Posted by CornedBee View Post
No, that's not what volatile means. But I won't go into it any deeper, since a beginner never needs to use volatile. (For that matter, very few non-beginners need to, either.)
I suspect tabstop is referring to a couple of special cases in the standard. For example, a const volatile variable, if it is never used, is not required to have any memory allocated for it.

More generally, however ......

All volatile means is that the variable may be modified in ways that the compiler cannot detect.

Practically, that often has an effect on ability of a compiler to optimise any code that accesses or modifies that variable (e.g. the compiler cannot assume the variable maintains the same value throughout the body of a function, even if that function does not actually change the value).

The volatile keyword does not imply any specific change of where that variable may be placed in memory (a compiler may place a variable in a different location depending on whether it is volatile or not, but is not required to), except in the special case I referred to above.

As you say the meaning is a little deeper, but I doubt we need to discuss the abstract machine today.