M
Michael Podolsky
That is why I snipped it as irrelevant. On cases of unspecified
behaviors (something may or may not happen) standard tends to tell the
limits of allowable behaviors. (not so on case of undefined behaviors).
That is cite of §1.9/3? Mine copy has such: "Certain other aspects
and operations of the abstract machine are described in this
International Standard as unspecified (for example, order of evaluation
of arguments to a function). Where possible, this International Standard
defines a set of allowable behaviors. These define the
nondeterministic aspects of the abstract machine. An instance of the
abstract machine can thus have more than one possible execution for a
given program and a given input."
I think it's quite the same. My idea was that changing observable
behavior does not prove by itself anything about violation of C++
standard, as an abstract machine may have a set of allowed behaviors,
specifically because of unspecified aspects of the standard.
What set of allowable behaviors for what unspecified behavior you are
talking about? What paragraph?
I generally meant that for lock-unlock there is respectively acquire
and release semantics and for acquire and release semantics there are
some limitations which leave still a space for a reordering of release
operation with following acquire operation. I think, I can prove by
references to particular paragraphs that a release operation may be
reordered with following acquire without violation of the standard.
But I think it is generally obvious. (it may be still not obvious or
not so at all for lock-unlock).
But... I currently came to some conclusion (with the help of this
forum) that I was not right from the start, and had some
misconceptions about C++ execution model. So what I am saying in this
post is just in the context of the thread, while I generally tend to
agree that unlock and following lock can't be reordered (not
completely, at least) by C++11 rules.
Regards, Michael