[KinoSearch] 64-bit linux errors with t/core/032-string_helper.t

Eric Howe eric at pieinsky.ca
Mon Jan 18 21:53:47 PST 2010


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
eric at pieinsky.ca




More information about the kinosearch mailing list