Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423334AbXBHVMT (ORCPT ); Thu, 8 Feb 2007 16:12:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423363AbXBHVMT (ORCPT ); Thu, 8 Feb 2007 16:12:19 -0500 Received: from tmailer.gwdg.de ([134.76.10.23]:46296 "EHLO tmailer.gwdg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423334AbXBHVMS (ORCPT ); Thu, 8 Feb 2007 16:12:18 -0500 Date: Thu, 8 Feb 2007 22:10:23 +0100 (MET) From: Jan Engelhardt To: Linus Torvalds cc: 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: 1209 Lines: 31 On Feb 8 2007 11:53, Linus Torvalds wrote: >On Thu, 8 Feb 2007, Jan Engelhardt wrote: >> >Exactly because "char *" doesn't have a defined sign, >The user has clearly stated "I don't care about the sign". If a compiler >complains about us passing "unsigned char *" (or, if "char" is naturally >unsigned on that platform, "signed char *") to strcmp then that compiler >IS BROKEN. Because "strcmp()" takes "char *", which simply DOES NOT HAVE a >uniquely defined sign. Thank you for this insight, I don't usually read standards, only RFCs :) Uh, does that also apply to the longer types, int, long etc.? I hope not. >only a TOTALLY INCOMPETENT compiler will warn about its signedness. >That's why we can't have -Wpointer-sign on by default. The gcc warning is >simply *crap*. >[...] >It really is that simple. gcc is broken. The C language isn't, it's purely >a broken compiler issue. Maybe you could send in a patch to gcc that fixes the issue? Jan -- - 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/