...
 
Commits (3)
......@@ -29,19 +29,19 @@ static inline bool kaze_mul_overflow_int32 (int32_t a, int32_t b)
#if __GNUC__ > 5
#define ADD_OVERFLOWS(a, b) __builtin_add_overflow_p(a, b, __typeof__(a+b)0)
#define ADD_OVERFLOWS(a, b) __builtin_add_overflow_p(a, b, (__typeof__(a+b))0)
#else
#define ADD_OVERFLOWS(a, b) kaze_add_overflow_int32(a, b)
#endif
#if __GNUC__ > 5
#define SUB_OVERFLOWS(a, b) __builtin_sub_overflow_p(a, b, __typeof__(a-b)0)
#define SUB_OVERFLOWS(a, b) __builtin_sub_overflow_p(a, b, (__typeof__(a-b))0)
#else
#define SUB_OVERFLOWS(a, b) kaze_add_overflow_int32(a, -b)
#endif
#if __GNUC__ > 5
#define MUL_OVERFLOWS(a, b) _builtin_mul_overflow_p(a, b, __typeof__(a*b)0)
#define MUL_OVERFLOWS(a, b) __builtin_mul_overflow_p(a, b, (__typeof__(a*b))0)
#else
#define MUL_OVERFLOWS(a, b) kaze_mul_overflow_int32(a, b)
#endif
......