Lines Matching defs:array

4   int x[2]; // expected-note 4 {{array 'x' declared here}}
5 int y[2]; // expected-note 2 {{array 'y' declared here}}
6 int z[1]; // expected-note {{array 'z' declared here}}
9 y[2] = 2; // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
10 z[1] = 'x'; // expected-warning {{array index of '1' indexes past the end of an array (that contains 1 element)}}
11 return x[2] + // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
12 y[-1] + // expected-warning {{array index of '-1' indexes before the beginning of the array}}
13 x[sizeof(x)] + // expected-warning {{array index of '8' indexes past the end of an array (that contains 2 elements)}}
14 x[sizeof(x) / sizeof(x[0])] + // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
16 x[sizeof(x[2])]; // expected-warning {{array index of '4' indexes past the end of an array (that contains 2 elements)}}
30 int val = a[3]; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
37 s2.a[3] = 0; // no warning for 0-sized array
43 u.a[3] = 1; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
46 p = &u.a[3]; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
47 *(&u.a[2]) = 1; // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
48 *(&u.a[3]) = 1; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
52 int array[2]; // expected-note {{declared here}}
53 array[const_subscript] = 0; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
59 array2[3] = 0; // expected-warning {{array index of '3' indexes past the end of an array (that contains 3 elements)}}
60 array2[2+2] = 0; // expected-warning {{array index of '4' indexes past the end of an array (that contains 3 elements)}}
66 char c2 = str2[5]; // expected-warning {{array index of '5' indexes past the end of an array (that contains 4 elements)}}
69 (*array_ptr)[3] = 1; // expected-warning {{array index of '3' indexes past the end of an array (that contains 2 elements)}}
77 s.arr[4] = 0; // expected-warning {{array index of '4' indexes past the end of an array (that contains 3 elements)}}
78 s.arr[I] = 0; // expected-warning {{array index of '5' indexes past the end of an array (that contains 3 elements)}}
89 int arr[SIZE]; // expected-note {{array 'arr' declared here}}
91 ARR_IN_MACRO(1, arr, SIZE); // expected-warning{{array index of '10' indexes past the end of an array (that contains 10 elements)}}
96 short array[100]; // expected-note {{array 'array' declared here}}
97 return array[(unsigned long long) 100]; // expected-warning {{array index of '100' indexes past the end of an array (that contains 100 elements)}}
100 // PR 9284 - a template parameter can cause an array bounds access to be
112 int arr[3 + (extendArray ? 1 : 0)]; // expected-note {{array 'arr' declared here}}
115 arr[3] = 42; // expected-warning{{array index of '3' indexes past the end of an array (that contains 3 elements)}}
126 int array[2];
127 return array[true]; // no-warning
131 int arr[2] = { 0, 0 }; // expected-note {{array 'arr' declared here}}
134 return sizeof(char) == sizeof(char) ? arr[2] : arr[1]; // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
145 int arr[2]; // expected-note {{array 'arr' declared here}}
146 arr[2] = 1; // expected-warning {{array index of '2' indexes past the end of an array (that contains 2 elements)}}
191 return F->c1[3]; // expected-warning {{array index of '3' indexes past the end of an array (that contains 1 element)}}
202 return F->c[3] + // expected-warning {{array index of '3' indexes past the end of an array (that contains 1 element)}}
203 B->c[3]; // expected-warning {{array index of '3' indexes past the end of an array (that contains 1 element)}}
209 int foo[5]; // expected-note 5 {{array 'foo' declared here}}
210 bar(foo[5]); // expected-warning {{array index of '5' indexes past the end of an array (that contains 5 elements)}}
211 ++foo[5]; // expected-warning {{array index of '5' indexes past the end of an array (that contains 5 elements)}}
212 if (foo[6]) // expected-warning {{array index of '6' indexes past the end of an array (that contains 5 elements)}}
213 return --foo[6]; // expected-warning {{array index of '6' indexes past the end of an array (that contains 5 elements)}}
215 return foo[5]; // expected-warning {{array index of '5' indexes past the end of an array (that contains 5 elements)}}
219 double foo[4096]; // expected-note {{array 'foo' declared here}}
224 ((char*)foo)[sizeof(foo)] = '\0'; // expected-warning {{array index of '32768' indexes past the end of an array (that contains 32768 elements)}}
234 double a[5]; // expected-note {{array 'a' declared here}}
235 test_pr11007_aux("foo", a[1000]); // expected-warning {{array index of '1000' indexes past the end of an array}}