------- Comment #6 from mf dot danger at gmail dot com 2006-09-25 18:47 ------- After consulting the oracle (In the this case ANSI X3.159-1989,) and being unable to find any information to support the claim that char is always different type than unsigned char or signed char, I'd like to have this bug reopened, at least as amended by my comments below.
3.5.4.1 (Pointer Declarators) and 3.3.3.2 (Address and Indirection Operators) the sections that deal with pointers make no mention, and 3.1.2.5 definitely says that whether char is signed or not is implementation defined. However, it seems to me, the discussion of what type char is is missing the one point of the original bug. The original bug points out that when the default type of char is set to one of signed or unsigned, the compiler does not treat pointers to char as if they have the same signedness as char. I'd like to at least see that much fixed, so that if -funsigned-char is used, then references through pointers are treated to the same warnings as direct references. By the way, there is no 6.2 in the the C '89 spec, as far as I can tell. Which spec were you referencing? Aside: char serves two distinct roles in C. While it is the character type, it is _also_ the smallest integer type. It is the only 8 bit integer type on most processors, and so serves the purpose of 8 bit integer arithmetic. This turns out to be important in cryptographic applications, among other things. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28912