From 0179e3e062b9287bc5b9812e4be0cbe7eac49ac0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 May 2026 17:59:14 -0700 Subject: [PATCH] Work around GCC bug 125116 * configure.ac: When configured with --enable-gcc-warnings, use the -Wno-analyzer-allocation-size option if available. This works around a false positive bug in GCC 16.0.1 20260321 (Red Hat 16.0.1-0) x86-64; see . --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a3ba5e69a2f..eeaaaa53a3d 100644 --- a/configure.ac +++ b/configure.ac @@ -1790,7 +1790,9 @@ AS_IF([test $gl_gcc_warnings = no], ;; esac AS_IF([test $gl_gcc_warnings = yes], - [WERROR_CFLAGS=-Werror], + [WERROR_CFLAGS=-Werror + # Work around GCC bug 125116. + gl_WARN_ADD([-Wno-analyzer-allocation-size])], [# Use -fanalyzer and related options only if --enable-gcc-warnings, # as they slow GCC considerably. nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"