467
|
1 int printf(const char *format, ...);
|
336
|
2
|
|
3 struct aho {
|
|
4 int i:1,j:1;
|
|
5 char a:7;
|
|
6 char :7,k:1,:3;
|
|
7 long long v:33;
|
|
8 long long w:33;
|
|
9 long long x:33;
|
|
10 } a /* = {-1,3,3,3,3} */ ;
|
|
11
|
|
12 union aho1 {
|
|
13 int i:1,j:1;
|
|
14 char a:7;
|
|
15 char :7,k:1,:3;
|
|
16 long long v:33;
|
|
17 long long w:33;
|
|
18 long long x:33;
|
|
19 } a11 ;
|
|
20
|
|
21 union ll1 {
|
337
|
22 unsigned char a[32];
|
336
|
23 struct {
|
|
24 char a:4;
|
|
25 long long v:33;
|
|
26 long long w:33;
|
|
27 long long x:33;
|
|
28 } b;
|
|
29 } ll1;
|
|
30
|
|
31 union ll0 {
|
337
|
32 unsigned char a[32];
|
336
|
33 struct {
|
|
34 char a:4;
|
|
35 long long v:48;
|
|
36 long long w:48;
|
|
37 long long x:48;
|
|
38 } b;
|
|
39 } ll0;
|
|
40
|
|
41
|
|
42 union ll {
|
337
|
43 unsigned char a[32];
|
336
|
44 struct {
|
|
45 char a:4;
|
|
46 long long v:56;
|
|
47 long long w:56;
|
|
48 long long x:56;
|
|
49 } b;
|
|
50 } ll;
|
|
51
|
|
52 union cc {
|
|
53 int a;
|
|
54 struct {
|
|
55 char a:1;
|
|
56 char b:4;
|
|
57 char c:7;
|
|
58 char d:4;
|
|
59 char e:4;
|
|
60 char f:4;
|
|
61 } b;
|
|
62 } cc;
|
|
63
|
|
64 union ii {
|
|
65 int a;
|
|
66 struct {
|
|
67 int a:1;
|
|
68 int b:4;
|
|
69 int c:4;
|
|
70 int d:4;
|
|
71 int e:4;
|
|
72 int f:4;
|
|
73 } b;
|
|
74 } ii;
|
545
|
75 void main5();
|
|
76 int
|
336
|
77 main()
|
|
78 {
|
337
|
79 int i;
|
491
|
80 printf("#0078:%d\n",a.i);
|
336
|
81
|
|
82 ll1.b.v = -1;
|
491
|
83 printf("#0081:01:%llx\n",ll1.b.v);
|
496
|
84 printf("#0082:02:"); for(i=0;i<32;i++) printf("#0082:%02x",ll1.a[i]); printf("#0082:\n");
|
336
|
85 ll1.b.v = 0;
|
|
86 ll1.b.w = -1;
|
496
|
87 printf("#0085:02:"); for(i=0;i<32;i++) printf("#0085:%02x",ll1.a[i]); printf("#0085:\n");
|
336
|
88 ll1.b.w = 0;
|
|
89 ll1.b.x = -1;
|
496
|
90 printf("#0088:02:"); for(i=0;i<32;i++) printf("#0088:%02x",ll1.a[i]); printf("#0088:\n");
|
336
|
91
|
|
92 ll0.b.v = -1;
|
491
|
93 printf("#0091:01:%llx\n",ll0.b.v);
|
496
|
94 printf("#0092:02:"); for(i=0;i<32;i++) printf("#0092:%02x",ll0.a[i]); printf("#0092:\n");
|
336
|
95 ll0.b.v = 0;
|
|
96 ll0.b.w = -1;
|
496
|
97 printf("#0095:02:"); for(i=0;i<32;i++) printf("#0095:%02x",ll0.a[i]); printf("#0095:\n");
|
336
|
98 ll0.b.w = 0;
|
|
99 ll0.b.x = -1;
|
496
|
100 printf("#0098:02:"); for(i=0;i<32;i++) printf("#0098:%02x",ll0.a[i]); printf("#0098:\n");
|
336
|
101
|
|
102 ll.b.v = -1;
|
491
|
103 printf("#0101:1:%llx\n",ll.b.v);
|
496
|
104 printf("#0102:02:"); for(i=0;i<32;i++) printf("#0102:%02x",ll.a[i]); printf("#0102:\n");
|
336
|
105 ll.b.v = 0;
|
|
106 ll.b.w = -1;
|
496
|
107 printf("#0105:02:"); for(i=0;i<32;i++) printf("#0105:%02x",ll.a[i]); printf("#0105:\n");
|
336
|
108 ll.b.w = 0;
|
|
109 ll.b.x = -1;
|
496
|
110 printf("#0108:02:"); for(i=0;i<32;i++) printf("#0108:%02x",ll.a[i]); printf("#0108:\n");
|
336
|
111
|
491
|
112 printf("#0110:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
|
336
|
113 cc.b.a = -1;
|
491
|
114 printf("#0112:a:%08x\n",cc.a);
|
336
|
115 cc.b.b = -1;
|
491
|
116 printf("#0114:b:%08x\n",cc.a);
|
336
|
117 cc.b.c = -1;
|
491
|
118 printf("#0116:c:%08x\n",cc.a);
|
336
|
119 cc.b.d = -1;
|
491
|
120 printf("#0118:d:%08x\n",cc.a);
|
336
|
121 cc.b.e = -1;
|
491
|
122 printf("#0120:e:%08x\n",cc.a);
|
336
|
123 cc.b.f = -1;
|
491
|
124 printf("#0122:f:%08x\n",cc.a);
|
|
125 printf("#0123:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
126 cc.a = -1;
|
491
|
127 printf("#0125:f:%08x\n",cc.a);
|
336
|
128 cc.b.a = 0;
|
491
|
129 printf("#0127:a:%08x\n",cc.a);
|
336
|
130 cc.b.b = 0;
|
491
|
131 printf("#0129:b:%08x\n",cc.a);
|
336
|
132 cc.b.c = 0;
|
491
|
133 printf("#0131:c:%08x\n",cc.a);
|
336
|
134 cc.b.d = 0;
|
491
|
135 printf("#0133:d:%08x\n",cc.a);
|
336
|
136 cc.b.e = 0;
|
491
|
137 printf("#0135:e:%08x\n",cc.a);
|
336
|
138 cc.b.f = 0;
|
491
|
139 printf("#0137:f:%08x\n",cc.a);
|
|
140 printf("#0138:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
141 cc.a = 0;
|
491
|
142 printf("#0140:f:%08x\n",cc.a);
|
336
|
143 cc.b.a = 1;
|
491
|
144 printf("#0142:a:%08x\n",cc.a);
|
336
|
145 cc.b.b = 1;
|
491
|
146 printf("#0144:b:%08x\n",cc.a);
|
336
|
147 cc.b.c = 1;
|
491
|
148 printf("#0146:c:%08x\n",cc.a);
|
336
|
149 cc.b.d = 1;
|
491
|
150 printf("#0148:d:%08x\n",cc.a);
|
336
|
151 cc.b.e = 1;
|
491
|
152 printf("#0150:e:%08x\n",cc.a);
|
336
|
153 cc.b.f = 1;
|
491
|
154 printf("#0152:f:%08x\n",cc.a);
|
|
155 printf("#0153:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
156 cc.a = -1;
|
491
|
157 printf("#0155:f:%08x\n",cc.a);
|
336
|
158 cc.b.a = 1;
|
491
|
159 printf("#0157:a:%08x\n",cc.a);
|
336
|
160 cc.b.b = 1;
|
491
|
161 printf("#0159:b:%08x\n",cc.a);
|
336
|
162 cc.b.c = 1;
|
491
|
163 printf("#0161:c:%08x\n",cc.a);
|
336
|
164 cc.b.d = 1;
|
491
|
165 printf("#0163:d:%08x\n",cc.a);
|
336
|
166 cc.b.e = 1;
|
491
|
167 printf("#0165:e:%08x\n",cc.a);
|
336
|
168 cc.b.f = 1;
|
491
|
169 printf("#0167:f:%08x\n",cc.a);
|
|
170 printf("#0168:3:%d %d\n",cc.b.c,cc.b.d);
|
336
|
171
|
|
172 ii.b.a = -1;
|
491
|
173 printf("#0171:6:%08x\n",ii.a);
|
336
|
174 ii.b.d = -1;
|
491
|
175 printf("#0173:6:%08x\n",ii.a);
|
|
176 printf("#0174:5:%d %d\n",ii.b.a,ii.b.d);
|
336
|
177
|
|
178 main5();
|
|
179 return 0;
|
|
180 }
|
|
181
|
545
|
182 void
|
336
|
183 main5()
|
|
184 {
|
|
185 int i,j,bit=1;
|
|
186 for(i=0;i<32;i++,bit<<=1) {
|
|
187 ii.a = bit;
|
491
|
188 printf("#0186:%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
|
189 ii.b.a,ii.b.b,ii.b.c,ii.b.d,ii.b.e,ii.b.f);
|
|
190 }
|
|
191 bit=1;
|
|
192 for(i=0;i<32;i++,bit<<=1) {
|
|
193 cc.a = bit;
|
491
|
194 printf("#0192:%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
|
195 cc.b.a,cc.b.b,cc.b.c,cc.b.d,cc.b.e,cc.b.f);
|
|
196 }
|
337
|
197 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
|
198 ll.b.v=ll.b.w=ll.b.x = 0;
|
337
|
199 for(i=7;i>=0;i--) {
|
336
|
200 bit=1;
|
|
201 for(j=0;j<32;j++,bit<<=1) {
|
|
202 ll.a[i] = bit;
|
545
|
203 printf("#0201:02:%02x %02x %02x %02x %02x %02x %02x %02x\n",
|
336
|
204 ll.a[0],ll.a[1],ll.a[2],ll.a[3],
|
|
205 ll.a[4],ll.a[5],ll.a[6],ll.a[7]
|
|
206 );
|
491
|
207 printf("#0205: ll.b.v=%lld ll.b.w=%lld ll.b.x=%lld\n",ll.b.v,ll.b.w,ll.b.x);
|
336
|
208 }
|
337
|
209 ll.a[i]=0;
|
336
|
210 }
|
|
211 }
|
|
212
|