d_decl_old_style_arguments.c revision 1.9.2.1 1 # 2 "d_decl_old_style_arguments.c"
2
3 /*
4 * A function is declared with a prototype, followed by an old-style definition
5 * that is completely different.
6 */
7
8 /* lint1-extra-flags: -X 351 */
9
10 void func(int a, int b, int c);
11
12 /* expect+5: warning: function definition for 'func' with identifier list is obsolete in C23 [384] */
13 /* expect+4: warning: parameter 'num' unused in function 'func' [231] */
14 /* expect+3: warning: parameter 'ptr' unused in function 'func' [231] */
15 /* expect+2: warning: parameter 'dbl' unused in function 'func' [231] */
16 /* expect+1: warning: parameter 'def' unused in function 'func' [231] */
17 void func(num, ptr, dbl, def)
18 int num;
19 char *ptr;
20 double dbl;
21 {
22 /* expect-1: warning: type of parameter 'def' defaults to 'int' [32] */
23 /* expect-2: error: parameter mismatch: 3 declared, 4 defined [51] */
24 }
25