param_key: fix container of when no struct member is referenced
[smatch.git] / validation / array-implicit-size.c
blob7011008b635af150a9c60d178cd00cae9a3162a2
1 static int array[] = { 0, 1, 2, 3, };
2 _Static_assert(sizeof(array) == 4 * sizeof(int), "size of array");
5 typedef int table_t[];
6 static table_t tbl2 = {
7 0,
8 1,
9 };
10 _Static_assert(sizeof(tbl2) == 2 * sizeof(int), "size of tbl2");
12 static table_t tbl1 = {
15 _Static_assert(sizeof(tbl1) == 1 * sizeof(int), "size of tbl1");
17 static table_t tbl3 = {
22 _Static_assert(sizeof(tbl3) == 3 * sizeof(int), "size of tbl3");
25 * check-name: array-implicit-size