lkml.org 
[lkml]   [2008]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-09-06 23:25    [W:0.081 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site