|
From: | Bryce McKinlay |
Subject: | Re: NEWS file for next release |
Date: | Fri, 08 Feb 2002 10:06:17 +1300 |
User-agent: | Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:0.9.7) Gecko/20011221 |
Stuart Ballard wrote:
I have no idea what a line of code that uses three : operators in a row could possibly mean (in either language) and I can't find the source code file to get context. But my guess is that the tokenizer is seeing :: and thinking "ooh, class member operator" (or whatever that operator is called in c++), and it doesn't occur to it that it might actually be two separate ":" operators.
That would be my guess too, since (after reading the GCC manual) it turns out that ":::" is not a trigraph after all.
Anyone know what these three ":" operators are actually supposed to bedoing in this case?
It was an inline asm statement, which has no operands. In this case I'll bet its there as a write barrier to synchronize memory before releasing a lock. On x86, the hardware never reorders writes (ie another CPU cannot see a lock as released before any previous writes to memory were completed), but having an empty inline asm with the "memory" flag is a safeguard to ensure that GCC will not reschedule writes across the lock either.
regards Bryce.
[Prev in Thread] | Current Thread | [Next in Thread] |