function_hooks: update comment explaining various function hooks
[smatch.git] / validation / flex-array-nested.c
blob094de2fbc392bd4ce47a586e8de73afda45047d1
1 struct f {
2 int i;
3 long f[];
4 };
6 struct s {
7 struct f f;
8 };
10 union u {
11 struct f f;
14 // trigger the examination of the offending types
15 static int foo(struct s *s, union u *u)
17 return __builtin_offsetof(typeof(*s), f)
18 + __builtin_offsetof(typeof(*u), f);
22 * check-name: flex-array-nested
23 * check-command: sparse -Wflexible-array-nested $file
25 * check-error-start
26 flex-array-nested.c:7:18: warning: nested flexible array
27 flex-array-nested.c:11:18: warning: nested flexible array
28 * check-error-end