Messages in this thread | | | Date | Sat, 6 Sep 2008 14:22:01 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [RFC patch 0/4] TSC calibration improvements |
| |
On Sat, 6 Sep 2008, Thomas Gleixner wrote: > > One gcc does: > > i++; > if (i >= QUICK_PIT_ITERATIONS) > goto out; > expect--; > > The other one does: > > i++; > expect--; > if (i >= QUICK_PIT_ITERATIONS) > goto out; > > Don't ask me which one is correct. It's just reality :(
Show me. Because I simply don't believe you.
The first code is simply _wrong_ - except if "expect" isn't even _used_ afterwards (in which case gcc can optimize away the last unused write).
And I strongly suspect that that is what you've seen.
Because quite frankly, if what you describe is real, then your gcc is incredibly buggy. So buggy that it sounds unlikely to be able to compile the kernel in many other places. This is very simple and very fundamental C, not something subtle or even half-way undefined.
Linus
| |