xref: /illumos-gate/usr/src/tools/smatch/src/validation/nested-declarator.c (revision a28480febf31f0e61debac062a55216a98a05a92)
1 typedef int T;
2 extern void f(int);
3 static void g(int x)
4 {
5 	int (T);
6 	T = x;
7 	f(T);
8 }
9 static void h(void)
10 {
11 	static int [2](T)[3];
12 }
13 static int [2](*p)[3];
14 int i(void (void)(*f));
15 int j(int [2](*));
16 /*
17  * check-name: nested declarator vs. parameters
18  * check-error-start
19 nested-declarator.c:11:23: warning: missing identifier in declaration
20 nested-declarator.c:11:23: error: Expected ; at the end of type declaration
21 nested-declarator.c:11:23: error: got (
22 nested-declarator.c:13:15: error: Expected ; at the end of type declaration
23 nested-declarator.c:13:15: error: got (
24 nested-declarator.c:14:18: error: Expected ) in function declarator
25 nested-declarator.c:14:18: error: got (
26 nested-declarator.c:15:14: error: Expected ) in function declarator
27 nested-declarator.c:15:14: error: got (
28  * check-error-end
29  */
30