msg_121.c revision 1.6
1/*	$NetBSD: msg_121.c,v 1.6 2022/06/19 12:14:34 rillig Exp $	*/
2# 3 "msg_121.c"
3
4// Test for message: negative shift [121]
5
6int
7example(int x)
8{
9	/* expect+1: warning: negative shift [121] */
10	return x << (3 - 5);
11}
12
13void /*ARGSUSED*/
14shift_by_double(int x, double amount)
15{
16	/*
17	 * This is already caught by typeok_scalar, so it doesn't reach
18	 * typeok_shift via typeok_op.
19	 */
20	/* expect+1: error: operands of '<<' have incompatible types 'int' and 'double' [107] */
21	return x << amount;
22}
23