lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Howe <>
Subject Re: [KinoSearch] 64-bit linux errors with t/core/032-string_helper.t
Date Tue, 19 Jan 2010 05:53:47 GMT
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

View raw message