[cpp-threads] C++ memory model

Lawrence Crowl crowl at google.com
Tue Sep 22 22:50:49 BST 2009


On 9/22/09, Boehm, Hans <hans.boehm at hp.com> wrote:
> From: Lawrence Crowl [mailto:crowl at google.com]
> > 8.7 section 29.3 paragraph 9
> >
> > | Deleting "Implementations shall not ... out of an unbounded loop."
> > | Adding "An atomic operation contained in a substatement of one of
> > | the iteration statements specified in 6.5 must not be moved out of
> > | the substatement."
> >
> > The added sentence is okay in direction, but the wording does
> > not reflect the fact that the standard likes "shall" and the
> > standard likes to specify whether requirements are on the
> > implementation or the program.  I would rewrite that statement as:
> >
> >     The implementation shall not move an atomic side effect contained
> >     in a substatement of one of the iteration statements specified in
> >     6.5 out of the substatement.
>
> I still have a general problem with all forms of this sentence,
> in that it doesn't seem to be a constraint on observable program
> behavior.  The program can't tell whether it was moved out of
> the loop or just held in a local store buffer indefinitely.

Agreed.

> It seems to me that the most we can really properly state is
> precisely what's already said in the preceding sentence.

Are you saying you would like to change the preceding sentence?

> I think this sentence should just disappear.
>
> Does Clark have an opinion?

-- 
Lawrence Crowl



More information about the cpp-threads mailing list