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+4: warning: parameter 'num' unused in function 'func' [231] */
13 /* expect+3: warning: parameter 'ptr' unused in function 'func' [231] */
14 /* expect+2: warning: parameter 'dbl' unused in function 'func' [231] */
15 /* expect+1: warning: parameter 'def' unused in function 'func' [231] */
func(num,ptr,dbl,def)16 void func(num, ptr, dbl, def)
17 int num;
18 char *ptr;
19 double dbl;
20 {
21 /* expect-1: warning: type of argument 'def' defaults to 'int' [32] */
22 /* expect-2: error: parameter mismatch: 3 declared, 4 defined [51] */
23 }
24