-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcallconv.c
More file actions
45 lines (40 loc) · 931 Bytes
/
callconv.c
File metadata and controls
45 lines (40 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
typedef struct { int i; } Small;
typedef struct { char i[5]; char x; } Small2;
typedef struct { char i[32]; char x; } Big1;
typedef struct { int i; int j; float k; } ClassesEz;
typedef struct { int i; int j; char k; } ClassesEz2;
typedef struct { char i[7]; short j; float k; } Classes;
typedef struct { int a; int b; union { double x; double y; int z; } c; } Union1;
typedef union { double x; double y; int z; } Union2;
typedef struct { long *a; long *b; } DoublePtr;
void takes_small(Small2 foo1) {
return;
}
void call_small() {
Small2 s = {0};
takes_small(s);
}
void eb_pair_mixed(ClassesEz c) {
c.i = 3;
c.j = 4;
return;
}
void call_eb_pair_mixed() {
ClassesEz c = {0};
eb_pair_mixed(c);
return;
}
ClassesEz return_ebpair_mixed() {
ClassesEz c = {0};
return c;
}
void take_big1(Big1 big1) {
big1.i[3] = 77;
return;
}
void take_ptrs(DoublePtr dp) {
return;
}
Union2 u2(Union2 u) {
return u;
}