On Sun, 17 Aug 2008, Carl Witty wrote:

> On Sun, Aug 17, 2008 at 1:11 AM, Robert Bradshaw
> <[EMAIL PROTECTED]> wrote:
>> Constants will be optimized away. But if I write "i+1" where i is an
>> unsigned int, the result is still signed.
>
> Are you talking about Cython or C here?  In C, if i is an unsigned
> int, then i+1 is also an unsigned int.  If that's not the case in
> Cython, I think it should be changed to match C.

Ah, so in C, signed ints get promoted to unsigned ints. Interesting. 
Cython should be fixed to reflect this, and this will make declaring 
indices non-negative much easier (though I'm not going to do that until 
next release as there may be unintended side effects).

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to