aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/cond-address-function.c
blob: 9a143a0091639e264a1ca6e55c174585d094bc3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern void func(void);

int global_function(void)
{
	if (func)
		return 1;
	return 0;
}

/*
 * check-name: cond-address-function
 * check-command: test-linearize -Wno-decl -Waddress $file
 * check-output-ignore
 *
 * check-error-start
cond-address-function.c:5:13: warning: the address of a function will always evaluate as true
 * check-error-end
 */