aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/scheck/ok.c
blob: 8f65013e1618f3e71030da01fbcff75995d97340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
static void ok(int x)
{
	__assert((~x) == (~0 - x));	// true but not simplified yet
	__assert_eq(~x, ~0 - x);
	__assert_const(x & 0, 0);
}

static void always(int x)
{
	__assert((x - x) == 0);		// true and simplified
}

/*
 * check-name: scheck-ok
 * check-command: scheck $file
 */