Implement the part of C89 6.5.7 p3 requiring a constant initializer list
when initializing aggregate/union types, no matter if static or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186817 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index a410a62..557acf6 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -116,3 +116,7 @@
unsigned long long ull1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
42ULL; /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
+void test17(int v, int w) {
+ int a[2] = { v, w }; /* expected-warning {{initializer for aggregate is not a compile-time constant}} */
+}
+