type cast in initializer

Doug Gwyn gwyn at brl-smoke.ARPA
Fri Feb 14 19:03:56 AEST 1986


>The values of '\377' and -1 are one and the same without a type cast.

Well, on some architectures they are and on some they aren't.
X3J11 appears to have decided that they are the same whenever
a plain (char) is treated as (signed char); otherwise '\377'
has the value 255.  I don't like this, but I suspect it's in
the rules for "historical reasons".



More information about the Comp.lang.c mailing list