aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/function-attribute.c
blob: 2be180c423517c946bd1b5c7d1d5a6d0ca984dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define __pure __attribute__((pure))


static __pure int funi(int val)
{
	return val;
}

static __pure int *funp(int *ptr)
{
	return ptr;
}

static void foo(int val, int *ptr)
{
	int  nbr = funi(val);
	int *res = funp(ptr);
}

/*
 * check-name: function-attribute
 */