// RUN: %clang_cc1 -verify -fstrict-flex-arrays=2 %s
// We cannot know for sure the size of a flexible array.
structt{int f;int a[];};voidtest(t *s2){
s2->a[2]=0;// no-warning
}// Under -fstrict-flex-arrays `a` is not a flexible array.
structt1{int f;int a[1];// expected-note {{array 'a' declared here}}
};voidtest1(t1 *s2){
s2->a[2]=0;// expected-warning {{array index 2 is past the end of the array (which contains 1 element)}}
}// Under -fstrict-flex-arrays `a` is a flexible array.
structt2{int f;int a[0];};voidtest1(t2 *s2){
s2->a[2]=0;// no-warning
}