Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 28 Feb 2003 22:02:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 28 Feb 2003 22:02:49 -0500 Received: from are.twiddle.net ([64.81.246.98]:4773 "EHLO are.twiddle.net") by vger.kernel.org with ESMTP id ; Fri, 28 Feb 2003 22:02:49 -0500 Date: Fri, 28 Feb 2003 19:12:53 -0800 From: Richard Henderson To: Linus Torvalds Cc: "Richard B. Johnson" , Martin Schwidefsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390 (7/13): gcc 3.3 adaptions. Message-ID: <20030228191253.B26656@twiddle.net> Mail-Followup-To: Linus Torvalds , "Richard B. Johnson" , Martin Schwidefsky , linux-kernel@vger.kernel.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from torvalds@transmeta.com on Mon, Feb 24, 2003 at 01:02:39PM -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 754 Lines: 24 On Mon, Feb 24, 2003 at 01:02:39PM -0800, Linus Torvalds wrote: > Does gcc still warn about things like > > #define COUNT (sizeof(array)/sizeof(element)) > > int i; > for (i = 0; i < COUNT; i++) > ... > > where COUNT is obviously unsigned (because sizeof is size_t and thus > unsigned)? Yes. We don't do complete value-range propagation to figure out if a warning is needed. We only look at the comparison itself and note that one of the arguments changed signedness due to forced promotions. r~ - 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/