aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/array-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r--test/Sema/array-init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index a7f27b68f8..69255569dd 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -212,3 +212,7 @@ int u2 = {{3}}; //expected-error{{too many braces around scalar initializer}}
void varArray() {
int c[][x] = { 0 }; //expected-error{{variable-sized object may not be initialized}}
}
+
+// PR2151
+int emptyInit() {struct {} x[] = {6};} //expected-warning{{empty struct extension}} expected-error{{initializer for aggregate with no elements}}
+