From ec343e871422076a5e7f30e88e257d3cc9d0573d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 27 Aug 2021 12:01:26 -0700 Subject: [PATCH] regex: also break glibc lib/regex.c link for now --- ChangeLog | 1 + config/srclist.txt | 2 +- lib/regex.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 902c5262cf..adfbcf3e21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ This should help with some static checking. Derived from a suggestion by Martin Sebor in: https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html + * config/srclist.txt: Remove lib/regex.c for now. * lib/regex.c: Ignore -Wvla for the whole file. * lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros. Ignore -Wvla when declaring regexec. diff --git a/config/srclist.txt b/config/srclist.txt index 218e04d9c3..e118ede049 100644 --- a/config/srclist.txt +++ b/config/srclist.txt @@ -65,7 +65,7 @@ $LIBCSRC malloc/scratch_buffer_grow_preserve.c lib/malloc $LIBCSRC malloc/scratch_buffer_set_array_size.c lib/malloc #$LIBCSRC include/intprops.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 7296be0f08..d32863972c 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 "-Wvla" # endif # if __GNUC_PREREQ (4, 3) # pragma GCC diagnostic ignored "-Wold-style-definition" -- 2.39.5