From f0cc3a1c845f68578b965e074415e3bf3aba4260 Mon Sep 17 00:00:00 2001 From: N-Storm <7067588+N-Storm@users.noreply.github.com> Date: Wed, 30 Apr 2025 09:13:13 +0300 Subject: [PATCH] Use portable _Float128 instead of __float128 From https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html: > __float128 is available on i386, x86_64, IA-64, LoongArch and hppa HP-UX, as well as on PowerPC GNU/Linux targets that enable the vector scalar (VSX) instruction set. __float128 supports the 128-bit floating type. On i386, x86_64, PowerPC, LoongArch and IA-64, other than HP-UX, __float128 is an alias for _Float128. On hppa and IA-64 HP-UX, __float128 is an alias for long double. I.e. __float128 aren't portable, as it's not available on every platform. ARM64 aka aarch64 are the example platform without __float128. While _Float128 are standard and main platforms just alias __float128 to _Float128 anyways. This fixes building for ARM64 with GCC at least (tested under Ubuntu 25.x / gcc-14.x) --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index fbf5deda..f466d331 100644 --- a/src/common.h +++ b/src/common.h @@ -11,7 +11,7 @@ using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; -using f128 = __float128; +using f128 = _Float128; static_assert(sizeof(u8) == 1, "size u8"); static_assert(sizeof(u32) == 4, "size u32");