]> Savannah Git Hosting - gnulib.git/commitdiff
gettext-h: Update theoretical condition for use of variable size arrays.
authorBruno Haible <bruno@clisp.org>
Thu, 15 Jun 2017 20:58:28 +0000 (22:58 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 15 Jun 2017 20:58:28 +0000 (22:58 +0200)
Reported by Paul Eggert.

* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend comment
to include the theoretical condition for availability of variable size
arrays, if we could trust the value of __STDC_VERSION__.

ChangeLog
lib/gettext.h

index 2b64f0801be33ceb790c0798c5061a9b1134a074..2e332a41384417947ceb5eaf77d344052516a657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-06-15  Bruno Haible  <bruno@clisp.org>
+
+       gettext-h: Update theoretical condition for use of variable size arrays.
+       Reported by Paul Eggert.
+       * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend comment
+       to include the theoretical condition for availability of variable size
+       arrays, if we could trust the value of __STDC_VERSION__.
+
 2017-06-12  Bruno Haible  <bruno@clisp.org>
 
        Relicense some modules under LGPLv2+.
index 2a12bb6c4a70dc8fc362396a4d1db029f516a6d7..fe56204f123dc6554c1ef288e736ac47d43f7a57 100644 (file)
@@ -185,7 +185,8 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-     /* || __STDC_VERSION__ >= 199901L */ )
+     /* || __STDC_VERSION__ == 199901L
+        || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
 #else
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0