8 int foo0_1 (TA1
) { return 1; }
9 int foo0_2 (TA3
) { return 2; }
10 int foo0_3 (A
***) { return 3; }
12 int foo1_1 (char *) {return 11;}
13 int foo1_2 (char[]) {return 12;}
14 int foo1_3 (int*) {return 13;}
15 int foo1_4 (A
*) {return 14;}
16 int foo1_5 (void*) {return 15;}
17 int foo1_6 (void**) {return 16;}
18 int foo1_7 (bool) {return 17;}
19 int foo1_8 (long) {return 18;}
21 int foo2_1 (char** ) {return 21;}
22 int foo2_2 (char[][1]) {return 22;}
23 int foo2_3 (char *[]) {return 23;}
24 int foo2_4 (int *[]) {return 24;}
26 int foo3_1 (int a
, const char **b
) { return 31; }
27 int foo3_2 (int a
, int b
) { return 32; }
28 int foo3_2 (int a
, const char **b
) { return 320; }
30 int foo1_type_check (char *a
) { return 1000; }
31 int foo2_type_check (char *a
, char *b
) { return 1001; }
32 int foo3_type_check (char *a
, char *b
, char *c
) { return 1002; }
37 TA2 ta
; // typedef to..
38 foo0_1 (ta
); // ..another typedef
39 foo0_2 (ta
); // ..typedef of a typedef
41 B
*** bppp
; // Pointer-to-pointer-to-pointer-to-derived..
42 //foo0_3(bppp); // Pointer-to-pointer-to-pointer base.
43 foo0_3((A
***)bppp
); // to ensure that the function is emitted.
45 char *a
; // pointer to..
47 foo1_1 (a
); // ..pointer
48 foo1_2 (a
); // ..array
49 foo1_3 ((int*)a
); // ..pointer of wrong type
50 foo1_3 ((int*)bp
); // ..pointer of wrong type
51 foo1_4 (bp
); // ..ancestor pointer
52 foo1_5 (bp
); // ..void pointer
53 foo1_6 ((void**)bp
); // ..void pointer pointer
54 foo1_7 (bp
); // ..boolean
55 foo1_8 ((long)bp
); // ..long int
57 char **b
; // pointer pointer to..
59 foo1_5 (b
); // ..void pointer
60 foo2_1 (b
); // ..pointer pointer
61 foo2_2 (ba
); // ..array of arrays
62 foo2_3 (b
); // ..array of pointers
63 foo2_4 ((int**)b
); // ..array of wrong pointers
66 foo3_2 (0, static_cast<char const**> (0));
70 foo2_type_check (a
, a
);
71 foo3_type_check (a
, a
, a
);
73 return 0; // end of main
This page took 0.039157 seconds and 4 git commands to generate.