From c95482e8e01091c2a77d42c08f21ff081b57f4fe Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 18 Apr 2025 18:45:27 +0300 Subject: [PATCH] gcc-15 should fix 32-bit x86 miscompilation --- README.md | 2 +- src/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c07599d..2942da7b 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ x86-64 (Linux): cpu microarchitecture: Haswell replxx: g++ 14.0.1; clang++ 19.1.0 x86 (Linux): - clang 19.1.0; CBQN is known to break on gcc x86 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 + clang 19.1.0; gcc≤14 results in miscompilation - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 running on the above x86-64 system, compiled with CCFLAGS=-m32 AArch64 ARMv8-A (within Termux on Android 8): using `lf=-landroid-spawn` from `pkg install libandroid-spawn` to get •SH to work diff --git a/src/main.c b/src/main.c index 826afed7..72b2b68c 100644 --- a/src/main.c +++ b/src/main.c @@ -13,8 +13,8 @@ #endif -#if __GNUC__ && __i386__ && !__clang__ - #warning "CBQN is known to miscompile on GCC for 32-bit x86 builds; using clang instead is suggested" +#if __GNUC__ <= 14 && __i386__ && !__clang__ + #warning "CBQN is known to miscompile on GCC for 32-bit x86 builds; use clang or gcc-15 or newer" #endif #if USE_REPLXX_IO && !USE_REPLXX #error "Cannot use USE_REPLXX_IO without USE_REPLXX"