Robert Bradshaw wrote: > On Mar 16, 2009, at 3:59 AM, Stefan Behnel wrote: > >> PS: Dag, I read your comment on "(2147483647 + 2147483647)" wrapping >> around in current Cython. I never thought about that, simply since >> I never >> ran into it. However, when I write >> >> py_large_val = 2147483647 + 2147483647 >> >> it must never wrap around as it clearly requests Python semantics, and >> when I write >> >> cdef uint64 c_large_val = 2147483647 + 2147483647 >> >> it must not wrap around either. I'm fine with a wrap-around in >> >> cdef int c_large_val = 2147483647 + 2147483647 >> >> though, because that's what the user a) requested or at least b) >> must be >> aware of when explicitly assigning types. So that's clearly >> different from >> a discussion on operator semantics. > > Very interesting--this only happens with constant literal > expressions, right? In that case constant folding should take care of > it.
Well, yes, sort of. At least it does something, although not to the better. http://trac.cython.org/cython_trac/ticket/237 Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
