[cpp-threads] pthreads (was: RE: C++ Connections proposal)
Peter Dimov
pdimov at mmltd.net
Tue Apr 26 15:09:09 BST 2005
Alexander Terekhov wrote:
> On 4/26/05, Peter Dimov <pdimov at mmltd.net> wrote:
>>> ELEM * tail = ++m_tail, --m_tail; // "as if" m_tail, compiler is
>>> just nastily legal
>>
>> Pretty evil. This is, I believe, an illegal transformation in this
>> particular case, but one needs to resort to very arcane language
>> lawyering to support that claim, and it's possible to argue the
>> matter for years without a definite conclusion.
>
> Note that without definite conclusion (that such transformation is
> illegal), pthreads read-write locking (and alike stuff) is nothing
> but joke, so to speak.
Worse, everything is a joke.
int x;
// thread 1
void f()
{
}
// thread 2
void g()
{
}
// undefined behavior
More information about the cpp-threads
mailing list