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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/