[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] [PROPOSED] Use VLAs in C11 compilers that advertise them
From: |
Paul Eggert |
Subject: |
[bug-gettext] [PROPOSED] Use VLAs in C11 compilers that advertise them |
Date: |
Thu, 15 Jun 2017 10:21:04 -0700 |
This doesn't fix any specific bug that I know about;
it just seems like the Right Thing To Do, given what C11 did about VLAs.
* gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
Define to 1 if 201112L <= __STDC_VERSION__ && !defined __STDC_NO_VLA__.
---
gnulib-local/lib/gettext.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h
index 75f59f6..6316d4d 100644
--- a/gnulib-local/lib/gettext.h
+++ b/gnulib-local/lib/gettext.h
@@ -185,7 +185,7 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
+ || (201112L <= __STDC_VERSION__ && !defined __STDC_NO_VLA__))
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
--
2.9.4
- [bug-gettext] [PROPOSED] Use VLAs in C11 compilers that advertise them,
Paul Eggert <=