xref: /illumos-gate/usr/src/tools/smatch/src/validation/bad-type-twice2.c (revision b210e77709da8e42dfe621e10ccf4be504206058)
1 extern type_t fun(int);
2 
3 int foo(int x, int y)
4 {
5 	return ((int)fun(y)) + x;
6 }
7 
8 /*
9  * check-name: bad-type-twice2
10  *
11  * check-error-start
12 bad-type-twice2.c:1:8: warning: 'type_t' has implicit type
13 bad-type-twice2.c:1:15: error: Expected ; at end of declaration
14 bad-type-twice2.c:1:15: error: got fun
15 bad-type-twice2.c:5:22: error: undefined identifier 'fun'
16 bad-type-twice2.c:5:18: error: cast from unknown type
17  * check-error-end
18  */
19