From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755167AbYIFVLI (ORCPT ); Sat, 6 Sep 2008 17:11:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753021AbYIFVK4 (ORCPT ); Sat, 6 Sep 2008 17:10:56 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35390 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752873AbYIFVKz (ORCPT ); Sat, 6 Sep 2008 17:10:55 -0400 Date: Sat, 6 Sep 2008 14:10:32 -0700 (PDT) From: Linus Torvalds To: Thomas Gleixner cc: Alok Kataria , Alan Cox , LKML , Arjan van de Veen , "H. Peter Anvin" , Peter Zijlstra , Dan Hecht , Garrett Smith Subject: Re: [RFC patch 0/4] TSC calibration improvements In-Reply-To: Message-ID: References: <20080904160036.GA18382@elte.hu> <20080904190728.59634020@lxorguk.ukuu.org.uk> <20080904204305.GA29065@elte.hu> <1220653095.14401.72.camel@alok-dev1> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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