]> Savannah Git Hosting - gnulib.git/commitdiff
gettext-h: document GNULIB_NO_VLA
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 27 Nov 2021 08:49:56 +0000 (00:49 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 27 Nov 2021 08:51:22 +0000 (00:51 -0800)
* doc/gnulib-readme.texi (C99 features avoided):
Document GNULIB_NO_VLA.

ChangeLog
doc/gnulib-readme.texi

index 66c53a923b4ffae779d495f4fc91427ab806350e..efc289fa66d131b8c96229b1fdbf7db4f94dbd30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 <=
index 0a32f980c1d132233cab4a2e6dab6546d305f1c9..9f9e1c1ce0d10a5b70070a4dafd3089394a2eaeb 100644 (file)
@@ -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