Messages in this thread | | | Date | Sat, 6 Sep 2008 14:10:32 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [RFC patch 0/4] TSC calibration improvements |
| |
On Sat, 6 Sep 2008, Thomas Gleixner wrote: > > Where is a guarantee, that excpect is not decremented before we break > out of the loop ?
Quite the reverse. We have a guarantee that it _is_ decremented.
Adn that guarantee is very much about the C language.
for (a ; b ; c) { .. }
translates as
a; while (b) { .. continue: c; }
And this has absolutely _nothing_ to do with any gcc oddity or anything else.
The fact is, the code that Ingo added was totally bogus. The real bug was that he did a totally bogus "--expect" in the argument to that last call.
Because 'c' *will* have been done after the last iteration of the loop.
Linus
| |