On Fri, Jan 21, 2011 at 01:06:02PM +0000, Jilles Tjoelker wrote: > > What you can do is use PRIdMAX from <inttypes.h>, normally defined as > "jd". You can then define this to "lld" or "jd" if it is not defined. > I think this makes the code uglier (just like your change), but oh well.
I agree. Brian, please update your patch accordingly. Thanks! > By the way, I wonder what the advantage of imaxdiv() above separate % > and / is. Compilers can detect the matching between a % b and a / b and > do it in one operation, and any use of imaxdiv() trips gcc's > -Waggregate-return. It used to generate smaller code with gcc. If gcc now knows how to optimise it properly then I guess we can remove imaxdiv. I just checked and gcc 4.4.5 still generates two divisions without imaxdiv. On the other hand gcc doesn't even inline imaxdiv. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html