msg_121.c revision 1.5
11.5Srillig/*	$NetBSD: msg_121.c,v 1.5 2022/06/16 16:58:36 rillig Exp $	*/
21.1Srillig# 3 "msg_121.c"
31.1Srillig
41.1Srillig// Test for message: negative shift [121]
51.1Srillig
61.2Srilligint
71.2Srilligexample(int x)
81.2Srillig{
91.5Srillig	/* expect+1: warning: negative shift [121] */
101.5Srillig	return x << (3 - 5);
111.2Srillig}
121.4Srillig
131.4Srilligvoid /*ARGSUSED*/
141.4Srilligshift_by_double(int x, double amount)
151.4Srillig{
161.4Srillig	/*
171.4Srillig	 * This is already caught by typeok_scalar, so it doesn't reach
181.4Srillig	 * typeok_shift via typeok_op.
191.4Srillig	 */
201.5Srillig	/* expect+1: error: operands of '<<' have incompatible types (int != double) [107] */
211.5Srillig	return x << amount;
221.4Srillig}
23