Skip to content

Commit 9ab4ac8

Browse files
Add a missing check that __uint128_t exists before using it.
I noticed a compilation error when building a 64-bit binary with this library while using xlclang on AIX, and this change seems to fix it.
1 parent bafd9d9 commit 9ab4ac8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fast_float/float_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ value128 full_multiplication(uint64_t a, uint64_t b) {
331331
answer.low = a * b;
332332
#elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__))
333333
answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64
334-
#elif defined(FASTFLOAT_64BIT)
334+
#elif defined(FASTFLOAT_64BIT) && defined(__SIZEOF_INT128__)
335335
__uint128_t r = ((__uint128_t)a) * b;
336336
answer.low = uint64_t(r);
337337
answer.high = uint64_t(r >> 64);

0 commit comments

Comments
 (0)