On Apr 15, 2010, at 7:59 AM, Lisandro Dalcin wrote: > I've already mailed about this, no one (other than Greg, of course) > commented... This patch fix and add tests for the C rules of integral > promotions in some interesting corner cases. The algorithm is > basically the one available in latest Pyrex plus the handling of > complex types. As we already discussed with Greg, this algorithm is > not actually correct according to the wording of the C99 standard (and > common sense), because type promotion do depends on the actual type > sizes. But Greg's implementation is IMHO the best we can do from > Pyrex/Cython side. > > If no one complains, I'll push the patch.
I'm fine with it. Basically, you're assuming that the rankings are strict, whereas the former code assumed that it was not. Unfortunately, most of the places this will come up is int < long = long long or int = long < long long, but there's not really a way to do better. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
