xref: /illumos-gate/usr/src/tools/smatch/src/validation/function-pointer-type.c (revision c85f09cc92abd00c84e58ec9f0f5d942906cb713)
1 extern int fun(void);
2 
fa(void)3 void fa(void) { int (*f)(void); f = &fun; }
f0(void)4 void f0(void) { int (*f)(void); f = fun; }	// C99,C11 6.3.2.1p4
f1(void)5 void f1(void) { int (*f)(void); f = *fun; }	// C99,C11 6.5.3.2p4
f2(void)6 void f2(void) { int (*f)(void); f = **fun; }	// C99,C11 6.5.3.2p4
f3(void)7 void f3(void) { int (*f)(void); f = ***fun; }	// C99,C11 6.5.3.2p4
8 
9 /*
10  * check-name: type of function pointers
11  * check-command: sparse -Wno-decl $file
12  */
13