xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_164.c (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 /*	$NetBSD: msg_164.c,v 1.3 2021/01/31 11:12:07 rillig Exp $	*/
2 # 3 "msg_164.c"
3 
4 // Test for message: assignment of negative constant to unsigned type [164]
5 
6 void
7 example(void)
8 {
9 	unsigned char uch = -3;		/* expect: 164 */
10 
11 	uch = -5;			/* expect: 164 */
12 	uch += -7;			/* expect: 222 */
13 	uch *= -1;			/* expect: 222 */
14 }
15