On 2010-01-18, at 21:05 , Marvin Humphrey wrote:
[...]
> It seems messed up that an unsigned type gets promoted to a negative signed
> type when used as an array subscript.  You're not supposed to use "char" on
> its own as an array subscript, because whether "char" is signed or unsigned is
> implementation defined, but either "signed char" or "unsigned char" are
> allowed.

Arrays in C are just convenient notation for pointer arithmetic so array 
indices in C are not char, nor are they signed char nor unsigned char, they're 
probably int. Are you getting tripped up by an implicit "a[(int)i]" cast on the 
index?

Just a wild guess.

Eric Howe
[email protected]

Reply via email to