• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
pure_int(int v)2 static __attribute__((__pure__)) int pure_int(int v)
3 {
4 	int i = v;
5 	return i;
6 }
7 
pure_ptr(void * p)8 static __attribute__((__pure__)) void *pure_ptr(void *p)
9 {
10     void *i = p;
11     return i;
12 }
13 
foo(int v,void * p)14 static void foo(int v, void *p)
15 {
16 	int   val = pure_int(v);
17 	void *ptr = pure_ptr(p);
18 
19 	(void)val;
20 	(void)ptr;
21 }
22 
23 /*
24  * check-name: Pure function attribute
25  */
26