* config/srclist.txt: Stop listing lib/regex.c.
* lib/regex.c: Also ignore -Wswitch-enum.
Needed for gcc 15.2.1 20250808 (Red Hat 15.2.1-1) x86-64.
---
 ChangeLog          | 5 +++++
 config/srclist.txt | 2 +-
 lib/regex.c        | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8b83dca9f6..8ff66910a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2025-09-10  Paul Eggert  <[email protected]>
 
+       regex: pacify gcc 15.2
+       * config/srclist.txt: Stop listing lib/regex.c.
+       * lib/regex.c: Also ignore -Wswitch-enum.
+       Needed for gcc 15.2.1 20250808 (Red Hat 15.2.1-1) x86-64.
+
        regex: fix support for overriding "gnulib"
        Problem reported by Pádraig Brady in:
        https://lists.gnu.org/r/bug-gnulib/2025-09/msg00104.html
diff --git a/config/srclist.txt b/config/srclist.txt
index cd68f38c5d..c9e6b4336e 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -68,7 +68,7 @@ $LIBCSRC malloc/scratch_buffer_set_array_size.c       
lib/malloc
 #$LIBCSRC include/intprops.h             lib
 #$LIBCSRC misc/sys/cdefs.h             lib
 #$LIBCSRC posix/regcomp.c              lib
-$LIBCSRC posix/regex.c                 lib
+#$LIBCSRC posix/regex.c                        lib
 #$LIBCSRC posix/regex.h                        lib
 #$LIBCSRC posix/regex_internal.c       lib
 #$LIBCSRC posix/regex_internal.h       lib
diff --git a/lib/regex.c b/lib/regex.c
index f5f6552670..1404dac753 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -24,6 +24,7 @@
 
 # if __GNUC_PREREQ (4, 6)
 #  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#  pragma GCC diagnostic ignored "-Wswitch-enum"
 #  pragma GCC diagnostic ignored "-Wvla"
 # endif
 #endif
-- 
2.51.0


Reply via email to