msg_259_ilp32.c revision 1.7
1/*	$NetBSD: msg_259_ilp32.c,v 1.7 2022/04/16 18:41:21 rillig Exp $	*/
2# 3 "msg_259_ilp32.c"
3
4/* Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259] */
5
6/*
7 * See also msg_259, which contains more examples for this warning.
8 *
9 * See also msg_297, but that requires the flags -a -p -P, which are not
10 * enabled in the default NetBSD build.
11 */
12
13/* lint1-only-if: ilp32 */
14/* lint1-flags: -h -w */
15
16void plain_char(char);
17void signed_int(int);
18void signed_long(long);
19
20void
21example(char c, int i, long l)
22{
23	plain_char(c);
24	signed_int(c);
25	/* expect+1: from 'char' to 'long' due to prototype [259] */
26	signed_long(c);
27
28	plain_char(i);
29	signed_int(i);
30	/* expect+1: from 'int' to 'long' due to prototype [259] */
31	signed_long(i);
32
33	plain_char(l);
34	/* expect+1: from 'long' to 'int' due to prototype [259] */
35	signed_int(l);
36	signed_long(l);
37}
38