• Nikolaus Rath's avatar
    __Pyx_PyInt_TrueDivideObjC: switch comparison order · 81290209
    Nikolaus Rath authored
    The current order results in compiler warnings on 32 bit machines, e.g.
    
    src/llfuse.c: In function '__Pyx_PyInt_TrueDivideObjC':
    src/llfuse.c:43980:17: warning: left shift count >= width of type
                     if (8 * sizeof(long) <= 53 || (__Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) || likely(labs(a) <= (1L << 53))) {
    
    Switching the order so that the left shift is closer to the sizeof test
    avoids the warning, presumably because it makes it easier for the
    compiler to see that the left shift is only executed on 64 bit.
    
    Thanks to Christian Neukirchen for doing most of the work!
    81290209
Optimize.c 30 KB