This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Heads-up: volatile and C++


Gabriel Dos Reis wrote:

Seriously, could you give the Ada standardese even though I'm not
supposed to understand?

-- Gaby

Here is the relevant RM quote


15   For an atomic object (including an atomic component) all reads and
updates of the object as a whole are indivisible.

16   For a volatile object all reads and updates of the object as a whole are
performed directly to memory.

17   Two actions are sequential (see 9.10) if each is the read or update of
the same atomic object.

18   If a type is atomic or volatile and it is not a by-copy type, then the
type is defined to be a by-reference type.  If any subcomponent of a type is
atomic or volatile, then the type is defined to be a by-reference type.

19   If an actual parameter is atomic or volatile, and the corresponding
formal parameter is not, then the parameter is passed by copy.


Implementation Requirements


20   The external effect of a program (see 1.1.3) is defined to include each
read and update of a volatile or atomic object.  The implementation shall not
generate any memory reads or updates of atomic or volatile objects other than
those specified by the program.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]