xref: /illumos-gate/usr/src/tools/smatch/src/validation/bug-bad-type.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 struct s {
2 	int   i;
3 };
4 
5 long a;
6 void foo(void)
7 {
8 	(struct s) { .i = (foo - a), };
9 }
10 
11 /*
12  * check-name: bug-bad-type
13  *
14  * check-error-start
15 bug-bad-type.c:5:6: warning: symbol 'a' was not declared. Should it be static?
16 bug-bad-type.c:8:32: error: arithmetics on pointers to functions
17  * check-error-end
18  */
19