I wrote:
> Paul Eggert wrote:
> > +#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
> > + && !defined __STDC_NO_VLA__)
> > +# define __ARG_NELTS(n) n
> > +#else
> > +# define __ARG_NELTS(n)
> > +#endif
>
> I would suggest to add a condition __GNUC__ >= 11 in the #if.
>
> Rationa
Paul Eggert wrote:
> +#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
> + && !defined __STDC_NO_VLA__)
> +# define __ARG_NELTS(n) n
> +#else
> +# define __ARG_NELTS(n)
> +#endif
I would suggest to add a condition __GNUC__ >= 11 in the #if.
Rationale: GCC version 10 provides rea
Paul Eggert wrote:
> +/* Specify the number of elements of a function's array parameter,
> + as in 'int f (int n, int a[__ARG_NELTS (n)]);'. */
> +#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
> + && !defined __STDC_NO_VLA__)
> +# define __ARG_NELTS(n) n
> +#else
> +# define
Fix typo in previous patch. Somehow I managed to
omit the main point of the patch
---
lib/regex.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/regex.h b/lib/regex.h
index 540c323163..118f9b4beb 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -680,9 +680,8 @@ exte
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
This also ports recent and relevant Glibc changes to Gnulib
and prepares to copy back.
* lib/cdefs.h (__ARG_NELTS): New macro.
* lib/regex.c: