diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/gnulib-readme.texi | 15 |
2 files changed, 17 insertions, 2 deletions
@@ -1,5 +1,9 @@ 2021-11-27 Paul Eggert <eggert@cs.ucla.edu> + gettext-h: document GNULIB_NO_VLA + * doc/gnulib-readme.texi (C99 features avoided): + Document GNULIB_NO_VLA. + gettext-h: use VLA test similar to regex * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <= diff --git a/doc/gnulib-readme.texi b/doc/gnulib-readme.texi index 0a32f980c1..9f9e1c1ce0 100644 --- a/doc/gnulib-readme.texi +++ b/doc/gnulib-readme.texi @@ -402,8 +402,19 @@ feature should require the corresponding module. @itemize @item -Variable length arrays, unless @code{__STDC_NO_VLA__} is defined. -See the @code{vararrays} module. +Variable length arrays (VLAs) or variably modified types, +without checking whether @code{__STDC_NO_VLA__} is defined. +See the @code{vararrays} and @code{vla} modules. + +@item +Block-scope variable length arrays, without checking whether either +@code{GNULIB_NO_VLA} or @code{__STDC_NO_VLA__} is defined. +This lets you define @code{GNULIB_NO_VLA} to pacify GCC when +using its @option{-Wvla-larger-than warnings} option, +and to avoid large stack usage that may have security implications. +@code{GNULIB_NO_VLA} does not affect Gnulib's other uses of VLAs and +variably modified types, such as array declarations in function +prototype scope. @item @code{extern inline} functions, without checking whether they are |