summaryrefslogtreecommitdiff
path: root/m4/vararrays.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/vararrays.m4')
-rw-r--r--m4/vararrays.m466
1 files changed, 33 insertions, 33 deletions
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
index 329eb490c3c..17563b519b0 100644
--- a/m4/vararrays.m4
+++ b/m4/vararrays.m4
@@ -18,44 +18,44 @@ AC_DEFUN([AC_C_VARARRAYS],
ac_cv_c_vararrays,
[AC_EGREP_CPP([defined],
[#ifdef __STDC_NO_VLA__
- defined
- #endif
+ defined
+ #endif
],
[ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[/* Test for VLA support. This test is partly inspired
- from examples in the C standard. Use at least two VLA
- functions to detect the GCC 3.4.3 bug described in:
- https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
- */
- #ifdef __STDC_NO_VLA__
- syntax error;
- #else
- extern int n;
- int B[100];
- int fvla (int m, int C[m][m]);
+ [AC_LANG_PROGRAM(
+ [[/* Test for VLA support. This test is partly inspired
+ from examples in the C standard. Use at least two VLA
+ functions to detect the GCC 3.4.3 bug described in:
+ https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
+ */
+ #ifdef __STDC_NO_VLA__
+ syntax error;
+ #else
+ extern int n;
+ int B[100];
+ int fvla (int m, int C[m][m]);
- int
- simple (int count, int all[static count])
- {
- return all[count - 1];
- }
+ int
+ simple (int count, int all[static count])
+ {
+ return all[count - 1];
+ }
- int
- fvla (int m, int C[m][m])
- {
- typedef int VLA[m][m];
- VLA x;
- int D[m];
- static int (*q)[m] = &B;
- int (*s)[n] = q;
- return C && &x[0][0] == &D[0] && &D[0] == s[0];
- }
- #endif
- ]])],
- [ac_cv_c_vararrays=yes],
- [ac_cv_c_vararrays=no])])])
+ int
+ fvla (int m, int C[m][m])
+ {
+ typedef int VLA[m][m];
+ VLA x;
+ int D[m];
+ static int (*q)[m] = &B;
+ int (*s)[n] = q;
+ return C && &x[0][0] == &D[0] && &D[0] == s[0];
+ }
+ #endif
+ ]])],
+ [ac_cv_c_vararrays=yes],
+ [ac_cv_c_vararrays=no])])])
if test "$ac_cv_c_vararrays" = yes; then
dnl This is for compatibility with Autoconf 2.61-2.69.
AC_DEFINE([HAVE_C_VARARRAYS], 1,