From 4a91c3da9124b663f91884a28b1b237e8678cb1f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 15 Nov 2023 16:11:34 +0100 Subject: [PATCH] build: Fix a compilation failure on AIX with gcc 10. * m4/more-warnings.m4 (gt_MORE_WARNINGS): Turn off -fanalyzer with GCC 10 or older. --- m4/more-warnings.m4 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/m4/more-warnings.m4 b/m4/more-warnings.m4 index 42c168b10..d223aa2b3 100644 --- a/m4/more-warnings.m4 +++ b/m4/more-warnings.m4 @@ -1,4 +1,4 @@ -# more-warnings.m4 serial 1 (gettext-0.21.2) +# more-warnings.m4 serial 1.1 (gettext-0.22.4) dnl Copyright (C) 2023 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -166,6 +166,20 @@ AS_HELP_STRING([[--disable-more-warnings]], [obey exactly the warning options sp dnl Cf. -Wshadow, above. gl_WARN_ADD([-Wshadow=local]) + dnl With GCC 10 and older, turn off -fanalyzer, because it requires too much + dnl memory in the compiler. + dnl See . In particular, + dnl on AIX 7.3, gcc 10.3 cannot compile regex.c with -fanalyzer: + dnl cc1: out of memory allocating 732 bytes after a total of 1072239104 bytes + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ + #if __GNUC__ > 10 + #error "You are lucky" + #endif + ]])], + [ + gl_WARN_ADD([-fno-analyzer]) + ]) + dnl For production code imported from other packages, disable some other dnl warnings. For imported code, I want to minimize difference w.r.t. dnl upstream. -- 2.47.2