summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-05-31 18:25:48 +0000
committerJeff Law <law@gcc.gnu.org>2019-05-31 12:25:48 -0600
commit2a1c064a94c077d3f0b1383f825de7105a7c075d (patch)
tree02172a08532abb2ebf0c5a8aaec1bc762cd77167 /libiberty
parent4d12cf3cc3143843225ecdb0e5048fc7c37b1574 (diff)
cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero.
* cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero. From-SVN: r271819
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/cp-demangle.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 0fac65bb153..c3daf2ae8c8 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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.
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 4e5b733b548..aa78c86dd44 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -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__) */