Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934847AbXEHK1p (ORCPT ); Tue, 8 May 2007 06:27:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934736AbXEHK1n (ORCPT ); Tue, 8 May 2007 06:27:43 -0400 Received: from ug-out-1314.google.com ([66.249.92.175]:61051 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934701AbXEHK1m (ORCPT ); Tue, 8 May 2007 06:27:42 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:date:from:x-x-sender:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; b=TLcvlP+pziNxlljnxawkG6GoPXIhctn2eIieiEqVAYrmQ3zlhqGbx7fybCn1J3VCpzLjxTYGu4usvXnk1PVYXqJG9OecgvK7uEFdg+foRx8tE1J9DV2EJpKxvL1LVH2e/u1xuGnHQk8IvBihPTXSZySlHzVjDXc4TUbhhkhg2SU= Date: Tue, 8 May 2007 12:27:28 +0200 (CEST) From: Esben Nielsen X-X-Sender: simlo@frodo.shire To: Johannes Stezenbach cc: Esben Nielsen , Linus Torvalds , Ingo Molnar , Balbir Singh , linux-kernel@vger.kernel.org, Andrew Morton , Con Kolivas , Nick Piggin , Mike Galbraith , Arjan van de Ven , Peter Williams , Thomas Gleixner , caglar@pardus.org.tr, Willy Tarreau , Gene Heskett , Mark Lord , Zach Carter , buddabrod Subject: Re: [patch] CFS scheduler, -v8 In-Reply-To: <20070508095421.GA10456@linuxtv.org> Message-ID: References: <463854F3.3020403@linux.vnet.ibm.com> <20070502100545.GA6857@elte.hu> <46386F2B.9050307@linux.vnet.ibm.com> <20070502111742.GA18132@elte.hu> <20070507183931.GB3472@linuxtv.org> <20070508095421.GA10456@linuxtv.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1687 Lines: 57 On Tue, 8 May 2007, Johannes Stezenbach wrote: > On Tue, May 08, 2007, Esben Nielsen wrote: >> >> This is contrary to C99 standeard annex H2.2 >> (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf): >> >> "An implementation that defines signed integer types as also being modulo >> need >> not detect integer overflow, in which case, only integer divide-by-zero need >> be detected." >> >> So if it doesn't properly defines wrapping it has to detect integer >> overflow, right? > > No. Annex H (informative!) only talks about LIA-1 conformance. > > C99 isn't LIA-1 conformant. H2.2 describes what an implementation > might do to make signed integers LIA-1 compatible. "The signed C integer types int, long int, long long int, and the corresponding unsigned types are compatible with LIA-1." I read this as any C99 implementation must be compatible. I would like to see LIA-1 to check. >, which is > what gcc does with -fwarpv or -ftrapv. > Yes, either or: Either wrap or trap. > At least that's how I understand it, the C99 standard > seems to have been written with the "it was hard to > write, so it should be hard to read" mindset. :-/ > > I still don't know _why_ signed integer overflow behaviour > isn't defined in C. It just goes against everyones expectation > and thus causes bugs. Because it is hard to make wrapping work on non twos complement architectures. Then it is easier to trap. Esben > > > Johannes > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/