1*c85f09ccSJohn Levon typedef unsigned int uint;
2*c85f09ccSJohn Levon typedef unsigned long ulong;
3*c85f09ccSJohn Levon 
int_2_iptr(int a)4*c85f09ccSJohn Levon static int * int_2_iptr(int a) { return (int *)a; }
uint_2_iptr(uint a)5*c85f09ccSJohn Levon static int * uint_2_iptr(uint a) { return (int *)a; }
6*c85f09ccSJohn Levon 
int_2_vptr(int a)7*c85f09ccSJohn Levon static void * int_2_vptr(int a) { return (void *)a; }
uint_2_vptr(uint a)8*c85f09ccSJohn Levon static void * uint_2_vptr(uint a) { return (void *)a; }
9*c85f09ccSJohn Levon 
10*c85f09ccSJohn Levon /*
11*c85f09ccSJohn Levon  * check-name: cast-weirds
12*c85f09ccSJohn Levon  * check-command: sparse -m64 $file
13*c85f09ccSJohn Levon  * check-assert: sizeof(void *) == 8
14*c85f09ccSJohn Levon  *
15*c85f09ccSJohn Levon  * check-error-start
16*c85f09ccSJohn Levon cast-weirds.c:4:48: warning: non size-preserving integer to pointer cast
17*c85f09ccSJohn Levon cast-weirds.c:5:50: warning: non size-preserving integer to pointer cast
18*c85f09ccSJohn Levon  * check-error-end
19*c85f09ccSJohn Levon  */
20