336
|
1
|
|
2 struct aho {
|
|
3 int i:1,j:1;
|
|
4 char a:7;
|
|
5 char :7,k:1,:3;
|
|
6 long long v:33;
|
|
7 long long w:33;
|
|
8 long long x:33;
|
|
9 } a /* = {-1,3,3,3,3} */ ;
|
|
10
|
|
11 union aho1 {
|
|
12 int i:1,j:1;
|
|
13 char a:7;
|
|
14 char :7,k:1,:3;
|
|
15 long long v:33;
|
|
16 long long w:33;
|
|
17 long long x:33;
|
|
18 } a11 ;
|
|
19
|
|
20 union ll1 {
|
337
|
21 unsigned char a[32];
|
336
|
22 struct {
|
|
23 char a:4;
|
|
24 long long v:33;
|
|
25 long long w:33;
|
|
26 long long x:33;
|
|
27 } b;
|
|
28 } ll1;
|
|
29
|
|
30 union ll0 {
|
337
|
31 unsigned char a[32];
|
336
|
32 struct {
|
|
33 char a:4;
|
|
34 long long v:48;
|
|
35 long long w:48;
|
|
36 long long x:48;
|
|
37 } b;
|
|
38 } ll0;
|
|
39
|
|
40
|
|
41 union ll {
|
337
|
42 unsigned char a[32];
|
336
|
43 struct {
|
|
44 char a:4;
|
|
45 long long v:56;
|
|
46 long long w:56;
|
|
47 long long x:56;
|
|
48 } b;
|
|
49 } ll;
|
|
50
|
|
51 union cc {
|
|
52 int a;
|
|
53 struct {
|
|
54 char a:1;
|
|
55 char b:4;
|
|
56 char c:7;
|
|
57 char d:4;
|
|
58 char e:4;
|
|
59 char f:4;
|
|
60 } b;
|
|
61 } cc;
|
|
62
|
|
63 union ii {
|
|
64 int a;
|
|
65 struct {
|
|
66 int a:1;
|
|
67 int b:4;
|
|
68 int c:4;
|
|
69 int d:4;
|
|
70 int e:4;
|
|
71 int f:4;
|
|
72 } b;
|
|
73 } ii;
|
|
74
|
|
75 main()
|
|
76 {
|
337
|
77 int i;
|
427
|
78 printf("#0077:%d\n",a.i);
|
336
|
79
|
|
80 ll1.b.v = -1;
|
427
|
81 printf("#0080:01:%llx\n",ll1.b.v);
|
|
82 printf("#0081:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n");
|
336
|
83 ll1.b.v = 0;
|
|
84 ll1.b.w = -1;
|
427
|
85 printf("#0084:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n");
|
336
|
86 ll1.b.w = 0;
|
|
87 ll1.b.x = -1;
|
427
|
88 printf("#0087:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n");
|
336
|
89
|
|
90 ll0.b.v = -1;
|
427
|
91 printf("#0090:01:%llx\n",ll0.b.v);
|
|
92 printf("#0091:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n");
|
336
|
93 ll0.b.v = 0;
|
|
94 ll0.b.w = -1;
|
427
|
95 printf("#0094:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n");
|
336
|
96 ll0.b.w = 0;
|
|
97 ll0.b.x = -1;
|
427
|
98 printf("#0097:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n");
|
336
|
99
|
|
100 ll.b.v = -1;
|
427
|
101 printf("#0100:1:%llx\n",ll.b.v);
|
|
102 printf("#0101:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n");
|
336
|
103 ll.b.v = 0;
|
|
104 ll.b.w = -1;
|
427
|
105 printf("#0104:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n");
|
336
|
106 ll.b.w = 0;
|
|
107 ll.b.x = -1;
|
427
|
108 printf("#0107:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n");
|
336
|
109
|
427
|
110 printf("#0109:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
336
|
111 cc.b.a = -1;
|
427
|
112 printf("#0111:a:%08x\n",cc.a);
|
336
|
113 cc.b.b = -1;
|
427
|
114 printf("#0113:b:%08x\n",cc.a);
|
336
|
115 cc.b.c = -1;
|
427
|
116 printf("#0115:c:%08x\n",cc.a);
|
336
|
117 cc.b.d = -1;
|
427
|
118 printf("#0117:d:%08x\n",cc.a);
|
336
|
119 cc.b.e = -1;
|
427
|
120 printf("#0119:e:%08x\n",cc.a);
|
336
|
121 cc.b.f = -1;
|
427
|
122 printf("#0121:f:%08x\n",cc.a);
|
|
123 printf("#0122:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
124 cc.a = -1;
|
427
|
125 printf("#0124:f:%08x\n",cc.a);
|
336
|
126 cc.b.a = 0;
|
427
|
127 printf("#0126:a:%08x\n",cc.a);
|
336
|
128 cc.b.b = 0;
|
427
|
129 printf("#0128:b:%08x\n",cc.a);
|
336
|
130 cc.b.c = 0;
|
427
|
131 printf("#0130:c:%08x\n",cc.a);
|
336
|
132 cc.b.d = 0;
|
427
|
133 printf("#0132:d:%08x\n",cc.a);
|
336
|
134 cc.b.e = 0;
|
427
|
135 printf("#0134:e:%08x\n",cc.a);
|
336
|
136 cc.b.f = 0;
|
427
|
137 printf("#0136:f:%08x\n",cc.a);
|
|
138 printf("#0137:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
139 cc.a = 0;
|
427
|
140 printf("#0139:f:%08x\n",cc.a);
|
336
|
141 cc.b.a = 1;
|
427
|
142 printf("#0141:a:%08x\n",cc.a);
|
336
|
143 cc.b.b = 1;
|
427
|
144 printf("#0143:b:%08x\n",cc.a);
|
336
|
145 cc.b.c = 1;
|
427
|
146 printf("#0145:c:%08x\n",cc.a);
|
336
|
147 cc.b.d = 1;
|
427
|
148 printf("#0147:d:%08x\n",cc.a);
|
336
|
149 cc.b.e = 1;
|
427
|
150 printf("#0149:e:%08x\n",cc.a);
|
336
|
151 cc.b.f = 1;
|
427
|
152 printf("#0151:f:%08x\n",cc.a);
|
|
153 printf("#0152:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
154 cc.a = -1;
|
427
|
155 printf("#0154:f:%08x\n",cc.a);
|
336
|
156 cc.b.a = 1;
|
427
|
157 printf("#0156:a:%08x\n",cc.a);
|
336
|
158 cc.b.b = 1;
|
427
|
159 printf("#0158:b:%08x\n",cc.a);
|
336
|
160 cc.b.c = 1;
|
427
|
161 printf("#0160:c:%08x\n",cc.a);
|
336
|
162 cc.b.d = 1;
|
427
|
163 printf("#0162:d:%08x\n",cc.a);
|
336
|
164 cc.b.e = 1;
|
427
|
165 printf("#0164:e:%08x\n",cc.a);
|
336
|
166 cc.b.f = 1;
|
427
|
167 printf("#0166:f:%08x\n",cc.a);
|
|
168 printf("#0167:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
169
|
|
170 ii.b.a = -1;
|
427
|
171 printf("#0170:6:%08x\n",ii.a);
|
336
|
172 ii.b.d = -1;
|
427
|
173 printf("#0172:6:%08x\n",ii.a);
|
|
174 printf("#0173:5:%d %d\n",ii.b.a,ii.b.d);
|
336
|
175
|
|
176 main5();
|
|
177 return 0;
|
|
178 }
|
|
179
|
|
180
|
|
181 main5()
|
|
182 {
|
|
183 int i,j,bit=1;
|
|
184 for(i=0;i<32;i++,bit<<=1) {
|
|
185 ii.a = bit;
|
427
|
186 printf("#0185:%08x:ii.b.a=%d ii.b.b=%d ii.b.c=%d ii.b.d=%d ii.b.e=%d ii.b.f=%d\n",bit,
|
336
|
187 ii.b.a,ii.b.b,ii.b.c,ii.b.d,ii.b.e,ii.b.f);
|
|
188 }
|
|
189 bit=1;
|
|
190 for(i=0;i<32;i++,bit<<=1) {
|
|
191 cc.a = bit;
|
427
|
192 printf("#0191:%08x:cc.b.a=%d cc.b.b=%d cc.b.c=%d cc.b.d=%d cc.b.e=%d cc.b.f=%d\n",bit,
|
336
|
193 cc.b.a,cc.b.b,cc.b.c,cc.b.d,cc.b.e,cc.b.f);
|
|
194 }
|
337
|
195 ll.a[0]=ll.a[1]=ll.a[2]=ll.a[3]= ll.a[4]=ll.a[5]=ll.a[6]=ll.a[7]=0;
|
341
|
196 ll.b.v=ll.b.w=ll.b.x = 0;
|
337
|
197 for(i=7;i>=0;i--) {
|
336
|
198 bit=1;
|
|
199 for(j=0;j<32;j++,bit<<=1) {
|
|
200 ll.a[i] = bit;
|
427
|
201 printf("#0200:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
|
336
|
202 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
203 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
204 );
|
428
|
205 printf("#0204: ll.b.v=%lld ll.b.w=%lld ll.b.x=%lld\n",ll.b.v,ll.b.w,ll.b.x);
|
336
|
206 }
|
337
|
207 ll.a[i]=0;
|
336
|
208 }
|
|
209 }
|
|
210
|