lkml.org 
[lkml]   [2008]   [Sep]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 6 Sep 2008 23:30:00 +0200 (CEST)
FromThomas Gleixner <>
SubjectRe: [RFC patch 0/4] TSC calibration improvements
On Sat, 6 Sep 2008, Linus Torvalds wrote:
> 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.

Just checked, yes you are right. I messed that up in my tiredness to see
the obvious bug in Ingo's fixup patch.

/me resorts to bed

    tglx


\
 
 \ /
  Last update: 2008-09-06 23:33    [from the cache]
©2003-2008