returns_negative_error_code: silence some false positives
[smatch.git] / validation / sizeof-incomplete-type.c
blob9fba00b38d447ec2038a7dc8aee951ae486ec15b
1 struct s {
2 char a;
3 char b[sizeof(struct s)];
4 char c;
5 char d[sizeof(struct s)];
6 int j:sizeof(struct s);
7 };
9 static int array[] = {
10 [0] = 0,
11 [sizeof(array)] = 1,
12 [2] = 0,
13 [sizeof(array)] = 2,
17 * check-name: sizeof incomplete type
19 * check-known-to-fail
20 * check-error-start
21 sizeof-incomplete-type.c:3:16: error: invalid application of 'sizeof' to incomplete type 'struct s'
22 sizeof-incomplete-type.c:5:16: error: invalid application of 'sizeof' to incomplete type 'struct s'
23 sizeof-incomplete-type.c:6:16: error: invalid application of 'sizeof' to incomplete type 'struct s'
24 sizeof-incomplete-type.c:11:17: error: invalid application of 'sizeof' to incomplete type 'int[]'
25 sizeof-incomplete-type.c:13:17: error: invalid application of 'sizeof' to incomplete type 'int[]'
26 * check-error-end