xref: /illumos-gate/usr/src/tools/smatch/src/validation/backend/pointer-cmp.c (revision f52943a93040563107b95bccb9db87d9971ef47d)
1 int cmpint(   int x,   int y)	{ return x == y; }
2 int cmpflt( float x, float y)	{ return x == y; }
3 int cmpvptr(void *x, void *y)	{ return x == y; }
4 int cmpiptr(int  *x, int  *y)	{ return x == y; }
5 
6 int cmpmptr(long  x, int  *y)	{ return (int*)x == y; }
7 int cmpnptr(int  *x, long  y)	{ return x == (int*)y; }
8 
9 /*
10  * check-name: pointer comparison
11  * check-command: sparsec -Wno-decl -c $file -o tmp.o
12  */
13