aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/char-unsigned-native.c
blob: b86458427da2768af599088b6f118862c4d7af12 (plain)
1
2
3
4
5
6
7
8
9
10
11
#define	MASK ((1 << __CHAR_BIT__) - 1)

void foo(void)
{
	_Static_assert((char) -1 == (-1 & MASK), "plain char is not unsigned");
}

/*
 * check-name: char-unsigned-native
 * check-command: sparse --arch=arm -Wno-decl $file
 */