Project

General

Profile

Bug #13748 ยป 0001-Fix-overflow-detection-for-LLP64-arch.patch

larskanis (Lars Kanis), 07/15/2017 01:22 PM

View differences:

internal.h
/* __builtin_mul_overflow_p can take bitfield */
/* and GCC permits bitfields for integers other than int */
#define MUL_OVERFLOW_FIXNUM_P(a, b) ({ \
struct { SIGNED_VALUE fixnum : SIZEOF_VALUE * CHAR_BIT - 1; } c; \
struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; \
__builtin_mul_overflow_p((a), (b), c.fixnum); \
})
#else
    (1-1/1)