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.
$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
# 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"