0038-void.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0038-void.c (1073B)
---
1 /*
2 PATTERN:
3 0038-void.c:22: error: 'void' must be the only parameter
4 0038-void.c:27: warning: 'a' defined but not used
5 0038-void.c:28: error: 'void' must be the only parameter
6 0038-void.c:33: warning: 'a' defined but not used
7 0038-void.c:34: error: 'void' must be the only parameter
8 0038-void.c:39: warning: 'b' defined but not used
9 0038-void.c:39: warning: 'a' defined but not used
10 0038-void.c:49: error: too many arguments in function call
11 0038-void.c:50: error: too few arguments in function call
12 0038-void.c:52: error: too many arguments in function call
13 0038-void.c:53: error: too few arguments in function call
14 0038-void.c:54: error: too few arguments in function call
15 0038-void.c:56: error: too few arguments in function call
16 0038-void.c:58: error: too many arguments in function call
17 too many errors
18 .
19 */
20
21 int
22 f1(void, int a)
23 {
24 return 0;
25 }
26
27 int
28 f2(int a, void)
29 {
30 return 0;
31 }
32
33 int
34 f3(int a, void, int b)
35 {
36 return 0;
37 }
38
39 int
40 f4(void)
41 {
42 return 0;
43 }
44
45 int
46 main()
47 {
48 f1(1);
49 f1(1, 2);
50 f1();
51 f2(1);
52 f2(1, 2);
53 f2();
54 f3(1);
55 f3(1, 2);
56 f3();
57 f4();
58 return f4(1);
59 }