cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero.
authorMichael Forney <mforney@mforney.org>
Fri, 31 May 2019 18:25:48 +0000 (18:25 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 31 May 2019 18:25:48 +0000 (12:25 -0600)
* cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__
is non-zero.

From-SVN: r271819

libiberty/ChangeLog
libiberty/cp-demangle.c

index 0fac65bb153421ce761bec61cefb74b75881024b..c3daf2ae8c881fd399a21b8b9401f1549315568d 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-31  Michael Forney  <mforney@mforney.org>
+
+       * cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__
+       is non-zero.
+
 2019-04-30  Ben L  <bobsayshilol@live.co.uk>
 
        * d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
index 4e5b733b548c9078c7a5f1322349b7e42b894672..aa78c86dd443c5078c5f440ebeaafd01ae3cd8ec 100644 (file)
@@ -192,9 +192,9 @@ static void d_init_info (const char *, int, size_t, struct d_info *);
 #else
 #ifdef __STDC__
 #ifdef __STDC_VERSION__
-#if __STDC_VERSION__ >= 199901L
+#if __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__
 #define CP_DYNAMIC_ARRAYS
-#endif /* __STDC__VERSION >= 199901L */
+#endif /* __STDC_VERSION__ >= 199901L && !__STDC_NO_VLA__ */
 #endif /* defined (__STDC_VERSION__) */
 #endif /* defined (__STDC__) */
 #endif /* ! defined (__GNUC__) */