xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_032.c (revision 3d6a50253cd682dca85a66a49baee893251dac65)
1*3d6a5025Srillig /*	$NetBSD: msg_032.c,v 1.10 2025/01/03 03:14:47 rillig Exp $	*/
2a0a15c14Srillig # 3 "msg_032.c"
3a0a15c14Srillig 
4039b0100Srillig // Test for message: type of parameter '%s' defaults to 'int' [32]
5a0a15c14Srillig 
6e6298b92Srillig /* lint1-extra-flags: -X 351 */
7e6298b92Srillig 
8*3d6a5025Srillig /* expect+1: warning: function definition for 'add' with identifier list is obsolete in C23 [384] */
9e6d45417Srillig add(a, b, c)
10e3a5018bSrillig /* expect+4: error: old-style declaration; add 'int' [1] */
11039b0100Srillig /* expect+3: warning: type of parameter 'a' defaults to 'int' [32] */
12039b0100Srillig /* expect+2: warning: type of parameter 'b' defaults to 'int' [32] */
13039b0100Srillig /* expect+1: warning: type of parameter 'c' defaults to 'int' [32] */
14e6d45417Srillig {
15e6d45417Srillig 	return a + b + c;
16e6d45417Srillig }
17