Etienne Lorrain wrote: > On C structures, for attributes like "const", it is enough to consider > that each field inherit the attribute of the structure. > But for the volatile attribute, is it valid to treat each field as > volatile like GCC does it now?
"An object that has volatile-qualified type may be modified in ways unknown to the implementation or have other unknown side effects. Therefore any expression referring to such an object shall be evaluated strictly according to the rules of the abstract machine, as described in 5.1.2.3." So, any reference to the object must treat the object as volatile, and that includes any reference to any part of the object. Andrew.