-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.h
More file actions
47 lines (42 loc) · 661 Bytes
/
struct.h
File metadata and controls
47 lines (42 loc) · 661 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
46
struct s1 {
int f0;
long long f1;
unsigned int f2;
int f3;
long f4;
int f5;
};
struct s2 {
int f0;
long long f1;
unsigned char f2;
signed char f3;
unsigned long long f4;
unsigned long long f5;
};
#pragma pack (1)
struct s2_packed {
int f0;
long long f1;
unsigned char f2;
signed char f3;
unsigned long long f4;
unsigned long long f5;
};
#pragma pack ()
struct s3 {
short f0;
short f1;
unsigned short f2;
unsigned int f3;
long long f4;
unsigned short f5;
};
struct s3_bitfield {
short f0 : 8;
short f1 : 3;
unsigned short f2 : 12;
unsigned int f3 : 8;
long long f4 : 9;
unsigned short f5 : 16;
};