Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423026AbXBIMh1 (ORCPT ); Fri, 9 Feb 2007 07:37:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423038AbXBIMh1 (ORCPT ); Fri, 9 Feb 2007 07:37:27 -0500 Received: from tmailer.gwdg.de ([134.76.10.23]:36825 "EHLO tmailer.gwdg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423026AbXBIMh0 (ORCPT ); Fri, 9 Feb 2007 07:37:26 -0500 Date: Fri, 9 Feb 2007 13:34:41 +0100 (MET) From: Jan Engelhardt To: Linus Torvalds cc: David Rientjes , Jeff Garzik , Linux Kernel Mailing List , Andrew Morton Subject: Re: somebody dropped a (warning) bomb In-Reply-To: Message-ID: References: <45CB3B28.60102@garzik.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 36 On Feb 8 2007 16:42, Linus Torvalds wrote: > >Most C types don't, and some you can't even tell (do pointers generate >"signed" or "unsigned" comparisons? I'd say "neither", because both signed void *ptr; and unsigned void *xyz; are impossible (and dull at that). That's why you explicitly will have to cast one operand in a comparison to make it evident what sort of comparison is intended, i.e. if((unsigned long)ptr < PAGE_OFFSET) Further, giving again answer to the question whether they generate signed or unsigned comparisons: Have you ever seen a computer which addresses memory with negative numbers? Since the answer is most likely no, signed comparisons would not make sense for me. > I'll argue that a compiler that >generates signed comparisons for them is broken, but it tends to be >something you can only see with a standards- conforming proghram if you >can allocate memory across the sign boundary, which may or may not be >true..) Jan -- ft: http://freshmeat.net/p/chaostables/ - 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/