1 |
298 |
jeremybenn |
/* Test for integer constant types. */
|
2 |
|
|
|
3 |
|
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
|
4 |
|
|
/* { dg-do compile } */
|
5 |
|
|
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
|
6 |
|
|
|
7 |
|
|
#include <limits.h>
|
8 |
|
|
|
9 |
|
|
/* Assertion that constant C is of type T. */
|
10 |
|
|
#define ASSERT_CONST_TYPE(C, T) \
|
11 |
|
|
do { \
|
12 |
|
|
typedef T type; \
|
13 |
|
|
typedef type **typepp; \
|
14 |
|
|
typedef __typeof__((C)) ctype; \
|
15 |
|
|
typedef ctype **ctypepp; \
|
16 |
|
|
typepp x = 0; \
|
17 |
|
|
ctypepp y = 0; \
|
18 |
|
|
x = y; \
|
19 |
|
|
y = x; \
|
20 |
|
|
} while (0)
|
21 |
|
|
|
22 |
|
|
/* (T *) if E is zero, (void *) otherwise. */
|
23 |
|
|
#define type_if_not(T, E) __typeof__(0 ? (T *)0 : (void *)(E))
|
24 |
|
|
|
25 |
|
|
/* (T *) if E is nonzero, (void *) otherwise. */
|
26 |
|
|
#define type_if(T, E) type_if_not(T, !(E))
|
27 |
|
|
|
28 |
|
|
/* Combine pointer types, all but one (void *). */
|
29 |
|
|
#define type_comb2(T1, T2) __typeof__(0 ? (T1)0 : (T2)0)
|
30 |
|
|
#define type_comb3(T1, T2, T3) type_comb2(T1, type_comb2(T2, T3))
|
31 |
|
|
#define type_comb4(T1, T2, T3, T4) \
|
32 |
|
|
type_comb2(T1, type_comb2(T2, type_comb2(T3, T4)))
|
33 |
|
|
|
34 |
|
|
/* (T1 *) if E1, otherwise (T2 *) if E2. */
|
35 |
|
|
#define first_of2p(T1, E1, T2, E2) type_comb2(type_if(T1, (E1)), \
|
36 |
|
|
type_if(T2, (!(E1) && (E2))))
|
37 |
|
|
/* (T1 *) if E1, otherwise (T2 *) if E2, otherwise (T3 *) if E3. */
|
38 |
|
|
#define first_of3p(T1, E1, T2, E2, T3, E3) \
|
39 |
|
|
type_comb3(type_if(T1, (E1)), \
|
40 |
|
|
type_if(T2, (!(E1) && (E2))), \
|
41 |
|
|
type_if(T3, (!(E1) && !(E2) && (E3))))
|
42 |
|
|
/* (T1 *) if E1, otherwise (T2 *) if E2, otherwise (T3 *) if E3, otherwise
|
43 |
|
|
(T4 *) if E4. */
|
44 |
|
|
#define first_of4p(T1, E1, T2, E2, T3, E3, T4, E4) \
|
45 |
|
|
type_comb4(type_if(T1, (E1)), \
|
46 |
|
|
type_if(T2, (!(E1) && (E2))), \
|
47 |
|
|
type_if(T3, (!(E1) && !(E2) && (E3))), \
|
48 |
|
|
type_if(T4, (!(E1) && !(E2) && !(E3) && (E4))))
|
49 |
|
|
|
50 |
|
|
/* Likewise, but return the original type rather than a pointer type. */
|
51 |
|
|
#define first_of2(T1, E1, T2, E2) \
|
52 |
|
|
__typeof__(*((first_of2p(T1, (E1), T2, (E2)))0))
|
53 |
|
|
#define first_of3(T1, E1, T2, E2, T3, E3) \
|
54 |
|
|
__typeof__(*((first_of3p(T1, (E1), T2, (E2), T3, (E3)))0))
|
55 |
|
|
#define first_of4(T1, E1, T2, E2, T3, E3, T4, E4) \
|
56 |
|
|
__typeof__(*((first_of4p(T1, (E1), T2, (E2), T3, (E3), T4, (E4)))0))
|
57 |
|
|
|
58 |
|
|
/* Types of constants according to the C90 rules. */
|
59 |
|
|
#define C90_UNSUF_DEC_TYPE(C) \
|
60 |
|
|
first_of3(int, (C) <= INT_MAX, \
|
61 |
|
|
long int, (C) <= LONG_MAX, \
|
62 |
|
|
unsigned long int, (C) <= ULONG_MAX)
|
63 |
|
|
#define C90_UNSUF_OCTHEX_TYPE(C) \
|
64 |
|
|
first_of4(int, (C) <= INT_MAX, \
|
65 |
|
|
unsigned int, (C) <= UINT_MAX, \
|
66 |
|
|
long int, (C) <= LONG_MAX, \
|
67 |
|
|
unsigned long int, (C) <= ULONG_MAX)
|
68 |
|
|
#define C90_SUFu_TYPE(C) \
|
69 |
|
|
first_of2(unsigned int, (C) <= UINT_MAX, \
|
70 |
|
|
unsigned long int, (C) <= ULONG_MAX)
|
71 |
|
|
#define C90_SUFl_TYPE(C) \
|
72 |
|
|
first_of2(long int, (C) <= LONG_MAX, \
|
73 |
|
|
unsigned long int, (C) <= ULONG_MAX)
|
74 |
|
|
|
75 |
|
|
/* Checks that constants have correct type. */
|
76 |
|
|
#define CHECK_UNSUF_DEC_TYPE(C) ASSERT_CONST_TYPE((C), C90_UNSUF_DEC_TYPE((C)))
|
77 |
|
|
#define CHECK_UNSUF_OCTHEX_TYPE(C) \
|
78 |
|
|
ASSERT_CONST_TYPE((C), C90_UNSUF_OCTHEX_TYPE((C)))
|
79 |
|
|
#define CHECK_SUFu_TYPE(C) ASSERT_CONST_TYPE((C), C90_SUFu_TYPE((C)))
|
80 |
|
|
#define CHECK_SUFl_TYPE(C) ASSERT_CONST_TYPE((C), C90_SUFl_TYPE((C)))
|
81 |
|
|
#define CHECK_SUFul_TYPE(C) ASSERT_CONST_TYPE((C), unsigned long int)
|
82 |
|
|
|
83 |
|
|
/* Check a decimal value, with all suffixes. */
|
84 |
|
|
#define CHECK_DEC_CONST(C) \
|
85 |
|
|
CHECK_UNSUF_DEC_TYPE(C); \
|
86 |
|
|
CHECK_SUFu_TYPE(C##u); \
|
87 |
|
|
CHECK_SUFu_TYPE(C##U); \
|
88 |
|
|
CHECK_SUFl_TYPE(C##l); \
|
89 |
|
|
CHECK_SUFl_TYPE(C##L); \
|
90 |
|
|
CHECK_SUFul_TYPE(C##ul); \
|
91 |
|
|
CHECK_SUFul_TYPE(C##uL); \
|
92 |
|
|
CHECK_SUFul_TYPE(C##Ul); \
|
93 |
|
|
CHECK_SUFul_TYPE(C##UL);
|
94 |
|
|
|
95 |
|
|
/* Check an octal or hexadecimal value, with all suffixes. */
|
96 |
|
|
#define CHECK_OCTHEX_CONST(C) \
|
97 |
|
|
CHECK_UNSUF_OCTHEX_TYPE(C); \
|
98 |
|
|
CHECK_SUFu_TYPE(C##u); \
|
99 |
|
|
CHECK_SUFu_TYPE(C##U); \
|
100 |
|
|
CHECK_SUFl_TYPE(C##l); \
|
101 |
|
|
CHECK_SUFl_TYPE(C##L); \
|
102 |
|
|
CHECK_SUFul_TYPE(C##ul); \
|
103 |
|
|
CHECK_SUFul_TYPE(C##uL); \
|
104 |
|
|
CHECK_SUFul_TYPE(C##Ul); \
|
105 |
|
|
CHECK_SUFul_TYPE(C##UL);
|
106 |
|
|
|
107 |
|
|
#define CHECK_OCT_CONST(C) CHECK_OCTHEX_CONST(C)
|
108 |
|
|
#define CHECK_HEX_CONST(C) \
|
109 |
|
|
CHECK_OCTHEX_CONST(0x##C); \
|
110 |
|
|
CHECK_OCTHEX_CONST(0X##C);
|
111 |
|
|
|
112 |
|
|
/* True iff "long" is at least B bits. This presumes that (B-2)/3 is at
|
113 |
|
|
most 31. */
|
114 |
|
|
#define LONG_AT_LEAST(B) \
|
115 |
|
|
(LONG_MAX >> ((B)-2)/3 >> ((B)-2)/3 >> ((B)-2 - ((B)-2)/3 - ((B)-2)/3))
|
116 |
|
|
|
117 |
|
|
#define LONG_HAS_BITS(B) (LONG_AT_LEAST((B)) && !LONG_AT_LEAST((B) + 1))
|
118 |
|
|
|
119 |
|
|
/* Decimal values that are large enough to be unsigned. Allow for up to
|
120 |
|
|
64 bits in long. */
|
121 |
|
|
#if LONG_HAS_BITS(32)
|
122 |
|
|
#define LARGE_UNSIGNED_DECIMAL 2147483648
|
123 |
|
|
#endif
|
124 |
|
|
#if LONG_HAS_BITS(33)
|
125 |
|
|
#define LARGE_UNSIGNED_DECIMAL 4294967296
|
126 |
|
|
#endif
|
127 |
|
|
#if LONG_HAS_BITS(34)
|
128 |
|
|
#define LARGE_UNSIGNED_DECIMAL 8589934592
|
129 |
|
|
#endif
|
130 |
|
|
#if LONG_HAS_BITS(35)
|
131 |
|
|
#define LARGE_UNSIGNED_DECIMAL 17179869184
|
132 |
|
|
#endif
|
133 |
|
|
#if LONG_HAS_BITS(36)
|
134 |
|
|
#define LARGE_UNSIGNED_DECIMAL 34359738368
|
135 |
|
|
#endif
|
136 |
|
|
#if LONG_HAS_BITS(37)
|
137 |
|
|
#define LARGE_UNSIGNED_DECIMAL 68719476736
|
138 |
|
|
#endif
|
139 |
|
|
#if LONG_HAS_BITS(38)
|
140 |
|
|
#define LARGE_UNSIGNED_DECIMAL 137438953472
|
141 |
|
|
#endif
|
142 |
|
|
#if LONG_HAS_BITS(39)
|
143 |
|
|
#define LARGE_UNSIGNED_DECIMAL 274877906944
|
144 |
|
|
#endif
|
145 |
|
|
#if LONG_HAS_BITS(40)
|
146 |
|
|
#define LARGE_UNSIGNED_DECIMAL 549755813888
|
147 |
|
|
#endif
|
148 |
|
|
#if LONG_HAS_BITS(41)
|
149 |
|
|
#define LARGE_UNSIGNED_DECIMAL 1099511627776
|
150 |
|
|
#endif
|
151 |
|
|
#if LONG_HAS_BITS(42)
|
152 |
|
|
#define LARGE_UNSIGNED_DECIMAL 2199023255552
|
153 |
|
|
#endif
|
154 |
|
|
#if LONG_HAS_BITS(43)
|
155 |
|
|
#define LARGE_UNSIGNED_DECIMAL 4398046511104
|
156 |
|
|
#endif
|
157 |
|
|
#if LONG_HAS_BITS(44)
|
158 |
|
|
#define LARGE_UNSIGNED_DECIMAL 8796093022208
|
159 |
|
|
#endif
|
160 |
|
|
#if LONG_HAS_BITS(45)
|
161 |
|
|
#define LARGE_UNSIGNED_DECIMAL 17592186044416
|
162 |
|
|
#endif
|
163 |
|
|
#if LONG_HAS_BITS(46)
|
164 |
|
|
#define LARGE_UNSIGNED_DECIMAL 35184372088832
|
165 |
|
|
#endif
|
166 |
|
|
#if LONG_HAS_BITS(47)
|
167 |
|
|
#define LARGE_UNSIGNED_DECIMAL 70368744177664
|
168 |
|
|
#endif
|
169 |
|
|
#if LONG_HAS_BITS(48)
|
170 |
|
|
#define LARGE_UNSIGNED_DECIMAL 140737488355328
|
171 |
|
|
#endif
|
172 |
|
|
#if LONG_HAS_BITS(49)
|
173 |
|
|
#define LARGE_UNSIGNED_DECIMAL 281474976710656
|
174 |
|
|
#endif
|
175 |
|
|
#if LONG_HAS_BITS(50)
|
176 |
|
|
#define LARGE_UNSIGNED_DECIMAL 562949953421312
|
177 |
|
|
#endif
|
178 |
|
|
#if LONG_HAS_BITS(51)
|
179 |
|
|
#define LARGE_UNSIGNED_DECIMAL 1125899906842624
|
180 |
|
|
#endif
|
181 |
|
|
#if LONG_HAS_BITS(52)
|
182 |
|
|
#define LARGE_UNSIGNED_DECIMAL 2251799813685248
|
183 |
|
|
#endif
|
184 |
|
|
#if LONG_HAS_BITS(53)
|
185 |
|
|
#define LARGE_UNSIGNED_DECIMAL 4503599627370496
|
186 |
|
|
#endif
|
187 |
|
|
#if LONG_HAS_BITS(54)
|
188 |
|
|
#define LARGE_UNSIGNED_DECIMAL 9007199254740992
|
189 |
|
|
#endif
|
190 |
|
|
#if LONG_HAS_BITS(55)
|
191 |
|
|
#define LARGE_UNSIGNED_DECIMAL 18014398509481984
|
192 |
|
|
#endif
|
193 |
|
|
#if LONG_HAS_BITS(56)
|
194 |
|
|
#define LARGE_UNSIGNED_DECIMAL 36028797018963968
|
195 |
|
|
#endif
|
196 |
|
|
#if LONG_HAS_BITS(57)
|
197 |
|
|
#define LARGE_UNSIGNED_DECIMAL 72057594037927936
|
198 |
|
|
#endif
|
199 |
|
|
#if LONG_HAS_BITS(58)
|
200 |
|
|
#define LARGE_UNSIGNED_DECIMAL 144115188075855872
|
201 |
|
|
#endif
|
202 |
|
|
#if LONG_HAS_BITS(59)
|
203 |
|
|
#define LARGE_UNSIGNED_DECIMAL 288230376151711744
|
204 |
|
|
#endif
|
205 |
|
|
#if LONG_HAS_BITS(60)
|
206 |
|
|
#define LARGE_UNSIGNED_DECIMAL 576460752303423488
|
207 |
|
|
#endif
|
208 |
|
|
#if LONG_HAS_BITS(61)
|
209 |
|
|
#define LARGE_UNSIGNED_DECIMAL 1152921504606846976
|
210 |
|
|
#endif
|
211 |
|
|
#if LONG_HAS_BITS(62)
|
212 |
|
|
#define LARGE_UNSIGNED_DECIMAL 2305843009213693952
|
213 |
|
|
#endif
|
214 |
|
|
#if LONG_HAS_BITS(63)
|
215 |
|
|
#define LARGE_UNSIGNED_DECIMAL 4611686018427387904
|
216 |
|
|
#endif
|
217 |
|
|
#if LONG_HAS_BITS(64)
|
218 |
|
|
#define LARGE_UNSIGNED_DECIMAL 9223372036854775808
|
219 |
|
|
#endif
|
220 |
|
|
#if LONG_AT_LEAST(65)
|
221 |
|
|
#error "extend this test to allow for long larger than 64 bits"
|
222 |
|
|
#endif
|
223 |
|
|
|
224 |
|
|
#define cat(x, y) x ## y
|
225 |
|
|
#define xcat(x, y) cat(x, y)
|
226 |
|
|
|
227 |
|
|
#define LARGE_UNSIGNED_DECIMALl xcat(LARGE_UNSIGNED_DECIMAL, l)
|
228 |
|
|
#define LARGE_UNSIGNED_DECIMALL xcat(LARGE_UNSIGNED_DECIMAL, L)
|
229 |
|
|
#define LARGE_UNSIGNED_DECIMALu xcat(LARGE_UNSIGNED_DECIMAL, u)
|
230 |
|
|
#define LARGE_UNSIGNED_DECIMALU xcat(LARGE_UNSIGNED_DECIMAL, U)
|
231 |
|
|
#define LARGE_UNSIGNED_DECIMALul xcat(LARGE_UNSIGNED_DECIMAL, ul)
|
232 |
|
|
#define LARGE_UNSIGNED_DECIMALuL xcat(LARGE_UNSIGNED_DECIMAL, uL)
|
233 |
|
|
#define LARGE_UNSIGNED_DECIMALUl xcat(LARGE_UNSIGNED_DECIMAL, Ul)
|
234 |
|
|
#define LARGE_UNSIGNED_DECIMALUL xcat(LARGE_UNSIGNED_DECIMAL, UL)
|
235 |
|
|
|
236 |
|
|
void
|
237 |
|
|
foo (void)
|
238 |
|
|
{
|
239 |
|
|
/* Decimal. */
|
240 |
|
|
/* Check all 2^n and 2^n - 1 up to 2^63 - 1. Check values that would be
|
241 |
|
|
unsigned separately since they generate a warning. */
|
242 |
|
|
CHECK_DEC_CONST(1);
|
243 |
|
|
CHECK_DEC_CONST(2);
|
244 |
|
|
CHECK_DEC_CONST(3);
|
245 |
|
|
CHECK_DEC_CONST(4);
|
246 |
|
|
CHECK_DEC_CONST(7);
|
247 |
|
|
CHECK_DEC_CONST(8);
|
248 |
|
|
CHECK_DEC_CONST(15);
|
249 |
|
|
CHECK_DEC_CONST(16);
|
250 |
|
|
CHECK_DEC_CONST(31);
|
251 |
|
|
CHECK_DEC_CONST(32);
|
252 |
|
|
CHECK_DEC_CONST(63);
|
253 |
|
|
CHECK_DEC_CONST(64);
|
254 |
|
|
CHECK_DEC_CONST(127);
|
255 |
|
|
CHECK_DEC_CONST(128);
|
256 |
|
|
CHECK_DEC_CONST(255);
|
257 |
|
|
CHECK_DEC_CONST(256);
|
258 |
|
|
CHECK_DEC_CONST(511);
|
259 |
|
|
CHECK_DEC_CONST(512);
|
260 |
|
|
CHECK_DEC_CONST(1023);
|
261 |
|
|
CHECK_DEC_CONST(1024);
|
262 |
|
|
CHECK_DEC_CONST(2047);
|
263 |
|
|
CHECK_DEC_CONST(2048);
|
264 |
|
|
CHECK_DEC_CONST(4095);
|
265 |
|
|
CHECK_DEC_CONST(4096);
|
266 |
|
|
CHECK_DEC_CONST(8191);
|
267 |
|
|
CHECK_DEC_CONST(8192);
|
268 |
|
|
CHECK_DEC_CONST(16383);
|
269 |
|
|
CHECK_DEC_CONST(16384);
|
270 |
|
|
CHECK_DEC_CONST(32767);
|
271 |
|
|
CHECK_DEC_CONST(32768);
|
272 |
|
|
CHECK_DEC_CONST(65535);
|
273 |
|
|
CHECK_DEC_CONST(65536);
|
274 |
|
|
CHECK_DEC_CONST(131071);
|
275 |
|
|
CHECK_DEC_CONST(131072);
|
276 |
|
|
CHECK_DEC_CONST(262143);
|
277 |
|
|
CHECK_DEC_CONST(262144);
|
278 |
|
|
CHECK_DEC_CONST(524287);
|
279 |
|
|
CHECK_DEC_CONST(524288);
|
280 |
|
|
CHECK_DEC_CONST(1048575);
|
281 |
|
|
CHECK_DEC_CONST(1048576);
|
282 |
|
|
CHECK_DEC_CONST(2097151);
|
283 |
|
|
CHECK_DEC_CONST(2097152);
|
284 |
|
|
CHECK_DEC_CONST(4194303);
|
285 |
|
|
CHECK_DEC_CONST(4194304);
|
286 |
|
|
CHECK_DEC_CONST(8388607);
|
287 |
|
|
CHECK_DEC_CONST(8388608);
|
288 |
|
|
CHECK_DEC_CONST(16777215);
|
289 |
|
|
CHECK_DEC_CONST(16777216);
|
290 |
|
|
CHECK_DEC_CONST(33554431);
|
291 |
|
|
CHECK_DEC_CONST(33554432);
|
292 |
|
|
CHECK_DEC_CONST(67108863);
|
293 |
|
|
CHECK_DEC_CONST(67108864);
|
294 |
|
|
CHECK_DEC_CONST(134217727);
|
295 |
|
|
CHECK_DEC_CONST(134217728);
|
296 |
|
|
CHECK_DEC_CONST(268435455);
|
297 |
|
|
CHECK_DEC_CONST(268435456);
|
298 |
|
|
CHECK_DEC_CONST(536870911);
|
299 |
|
|
CHECK_DEC_CONST(536870912);
|
300 |
|
|
CHECK_DEC_CONST(1073741823);
|
301 |
|
|
CHECK_DEC_CONST(1073741824);
|
302 |
|
|
CHECK_DEC_CONST(2147483647);
|
303 |
|
|
#if LONG_AT_LEAST(33)
|
304 |
|
|
CHECK_DEC_CONST(2147483648);
|
305 |
|
|
CHECK_DEC_CONST(4294967295);
|
306 |
|
|
#endif
|
307 |
|
|
#if LONG_AT_LEAST(34)
|
308 |
|
|
CHECK_DEC_CONST(4294967296);
|
309 |
|
|
CHECK_DEC_CONST(8589934591);
|
310 |
|
|
#endif
|
311 |
|
|
#if LONG_AT_LEAST(35)
|
312 |
|
|
CHECK_DEC_CONST(8589934592);
|
313 |
|
|
CHECK_DEC_CONST(17179869183);
|
314 |
|
|
#endif
|
315 |
|
|
#if LONG_AT_LEAST(36)
|
316 |
|
|
CHECK_DEC_CONST(17179869184);
|
317 |
|
|
CHECK_DEC_CONST(34359738367);
|
318 |
|
|
#endif
|
319 |
|
|
#if LONG_AT_LEAST(37)
|
320 |
|
|
CHECK_DEC_CONST(34359738368);
|
321 |
|
|
CHECK_DEC_CONST(68719476735);
|
322 |
|
|
#endif
|
323 |
|
|
#if LONG_AT_LEAST(38)
|
324 |
|
|
CHECK_DEC_CONST(68719476736);
|
325 |
|
|
CHECK_DEC_CONST(137438953471);
|
326 |
|
|
#endif
|
327 |
|
|
#if LONG_AT_LEAST(39)
|
328 |
|
|
CHECK_DEC_CONST(137438953472);
|
329 |
|
|
CHECK_DEC_CONST(274877906943);
|
330 |
|
|
#endif
|
331 |
|
|
#if LONG_AT_LEAST(40)
|
332 |
|
|
CHECK_DEC_CONST(274877906944);
|
333 |
|
|
CHECK_DEC_CONST(549755813887);
|
334 |
|
|
#endif
|
335 |
|
|
#if LONG_AT_LEAST(41)
|
336 |
|
|
CHECK_DEC_CONST(549755813888);
|
337 |
|
|
CHECK_DEC_CONST(1099511627775);
|
338 |
|
|
#endif
|
339 |
|
|
#if LONG_AT_LEAST(42)
|
340 |
|
|
CHECK_DEC_CONST(1099511627776);
|
341 |
|
|
CHECK_DEC_CONST(2199023255551);
|
342 |
|
|
#endif
|
343 |
|
|
#if LONG_AT_LEAST(43)
|
344 |
|
|
CHECK_DEC_CONST(2199023255552);
|
345 |
|
|
CHECK_DEC_CONST(4398046511103);
|
346 |
|
|
#endif
|
347 |
|
|
#if LONG_AT_LEAST(44)
|
348 |
|
|
CHECK_DEC_CONST(4398046511104);
|
349 |
|
|
CHECK_DEC_CONST(8796093022207);
|
350 |
|
|
#endif
|
351 |
|
|
#if LONG_AT_LEAST(45)
|
352 |
|
|
CHECK_DEC_CONST(8796093022208);
|
353 |
|
|
CHECK_DEC_CONST(17592186044415);
|
354 |
|
|
#endif
|
355 |
|
|
#if LONG_AT_LEAST(46)
|
356 |
|
|
CHECK_DEC_CONST(17592186044416);
|
357 |
|
|
CHECK_DEC_CONST(35184372088831);
|
358 |
|
|
#endif
|
359 |
|
|
#if LONG_AT_LEAST(47)
|
360 |
|
|
CHECK_DEC_CONST(35184372088832);
|
361 |
|
|
CHECK_DEC_CONST(70368744177663);
|
362 |
|
|
#endif
|
363 |
|
|
#if LONG_AT_LEAST(48)
|
364 |
|
|
CHECK_DEC_CONST(70368744177664);
|
365 |
|
|
CHECK_DEC_CONST(140737488355327);
|
366 |
|
|
#endif
|
367 |
|
|
#if LONG_AT_LEAST(49)
|
368 |
|
|
CHECK_DEC_CONST(140737488355328);
|
369 |
|
|
CHECK_DEC_CONST(281474976710655);
|
370 |
|
|
#endif
|
371 |
|
|
#if LONG_AT_LEAST(50)
|
372 |
|
|
CHECK_DEC_CONST(281474976710656);
|
373 |
|
|
CHECK_DEC_CONST(562949953421311);
|
374 |
|
|
#endif
|
375 |
|
|
#if LONG_AT_LEAST(51)
|
376 |
|
|
CHECK_DEC_CONST(562949953421312);
|
377 |
|
|
CHECK_DEC_CONST(1125899906842623);
|
378 |
|
|
#endif
|
379 |
|
|
#if LONG_AT_LEAST(52)
|
380 |
|
|
CHECK_DEC_CONST(1125899906842624);
|
381 |
|
|
CHECK_DEC_CONST(2251799813685247);
|
382 |
|
|
#endif
|
383 |
|
|
#if LONG_AT_LEAST(53)
|
384 |
|
|
CHECK_DEC_CONST(2251799813685248);
|
385 |
|
|
CHECK_DEC_CONST(4503599627370495);
|
386 |
|
|
#endif
|
387 |
|
|
#if LONG_AT_LEAST(54)
|
388 |
|
|
CHECK_DEC_CONST(4503599627370496);
|
389 |
|
|
CHECK_DEC_CONST(9007199254740991);
|
390 |
|
|
#endif
|
391 |
|
|
#if LONG_AT_LEAST(55)
|
392 |
|
|
CHECK_DEC_CONST(9007199254740992);
|
393 |
|
|
CHECK_DEC_CONST(18014398509481983);
|
394 |
|
|
#endif
|
395 |
|
|
#if LONG_AT_LEAST(56)
|
396 |
|
|
CHECK_DEC_CONST(18014398509481984);
|
397 |
|
|
CHECK_DEC_CONST(36028797018963967);
|
398 |
|
|
#endif
|
399 |
|
|
#if LONG_AT_LEAST(57)
|
400 |
|
|
CHECK_DEC_CONST(36028797018963968);
|
401 |
|
|
CHECK_DEC_CONST(72057594037927935);
|
402 |
|
|
#endif
|
403 |
|
|
#if LONG_AT_LEAST(58)
|
404 |
|
|
CHECK_DEC_CONST(72057594037927936);
|
405 |
|
|
CHECK_DEC_CONST(144115188075855871);
|
406 |
|
|
#endif
|
407 |
|
|
#if LONG_AT_LEAST(59)
|
408 |
|
|
CHECK_DEC_CONST(144115188075855872);
|
409 |
|
|
CHECK_DEC_CONST(288230376151711743);
|
410 |
|
|
#endif
|
411 |
|
|
#if LONG_AT_LEAST(60)
|
412 |
|
|
CHECK_DEC_CONST(288230376151711744);
|
413 |
|
|
CHECK_DEC_CONST(576460752303423487);
|
414 |
|
|
#endif
|
415 |
|
|
#if LONG_AT_LEAST(61)
|
416 |
|
|
CHECK_DEC_CONST(576460752303423488);
|
417 |
|
|
CHECK_DEC_CONST(1152921504606846975);
|
418 |
|
|
#endif
|
419 |
|
|
#if LONG_AT_LEAST(62)
|
420 |
|
|
CHECK_DEC_CONST(1152921504606846976);
|
421 |
|
|
CHECK_DEC_CONST(2305843009213693951);
|
422 |
|
|
#endif
|
423 |
|
|
#if LONG_AT_LEAST(63)
|
424 |
|
|
CHECK_DEC_CONST(2305843009213693952);
|
425 |
|
|
CHECK_DEC_CONST(4611686018427387903);
|
426 |
|
|
#endif
|
427 |
|
|
#if LONG_AT_LEAST(64)
|
428 |
|
|
CHECK_DEC_CONST(4611686018427387904);
|
429 |
|
|
CHECK_DEC_CONST(9223372036854775807);
|
430 |
|
|
#endif
|
431 |
|
|
/* Separate checks for values that are unsigned. */
|
432 |
|
|
CHECK_UNSUF_DEC_TYPE(LARGE_UNSIGNED_DECIMAL); /* { dg-warning "unsigned" "unsigned decimal no suffix" } */
|
433 |
|
|
CHECK_SUFl_TYPE(LARGE_UNSIGNED_DECIMALl); /* { dg-warning "unsigned" "unsigned decimal long suffix" } */
|
434 |
|
|
CHECK_SUFl_TYPE(LARGE_UNSIGNED_DECIMALL); /* { dg-warning "unsigned" "unsigned decimal long suffix" } */
|
435 |
|
|
CHECK_SUFu_TYPE(LARGE_UNSIGNED_DECIMALu);
|
436 |
|
|
CHECK_SUFu_TYPE(LARGE_UNSIGNED_DECIMALU);
|
437 |
|
|
CHECK_SUFul_TYPE(LARGE_UNSIGNED_DECIMALul);
|
438 |
|
|
CHECK_SUFul_TYPE(LARGE_UNSIGNED_DECIMALuL);
|
439 |
|
|
CHECK_SUFul_TYPE(LARGE_UNSIGNED_DECIMALUl);
|
440 |
|
|
CHECK_SUFul_TYPE(LARGE_UNSIGNED_DECIMALUL);
|
441 |
|
|
/* Octal and hexadecimal. */
|
442 |
|
|
/* Check all 2^n and 2^n - 1 up to 2^64 - 1. */
|
443 |
|
|
CHECK_OCT_CONST(0);
|
444 |
|
|
CHECK_HEX_CONST(0);
|
445 |
|
|
CHECK_OCT_CONST(01);
|
446 |
|
|
CHECK_HEX_CONST(1);
|
447 |
|
|
CHECK_OCT_CONST(02);
|
448 |
|
|
CHECK_HEX_CONST(2);
|
449 |
|
|
CHECK_OCT_CONST(03);
|
450 |
|
|
CHECK_HEX_CONST(3);
|
451 |
|
|
CHECK_OCT_CONST(04);
|
452 |
|
|
CHECK_HEX_CONST(4);
|
453 |
|
|
CHECK_OCT_CONST(07);
|
454 |
|
|
CHECK_HEX_CONST(7);
|
455 |
|
|
CHECK_OCT_CONST(010);
|
456 |
|
|
CHECK_HEX_CONST(8);
|
457 |
|
|
CHECK_OCT_CONST(017);
|
458 |
|
|
CHECK_HEX_CONST(f);
|
459 |
|
|
CHECK_OCT_CONST(020);
|
460 |
|
|
CHECK_HEX_CONST(10);
|
461 |
|
|
CHECK_OCT_CONST(037);
|
462 |
|
|
CHECK_HEX_CONST(1f);
|
463 |
|
|
CHECK_OCT_CONST(040);
|
464 |
|
|
CHECK_HEX_CONST(20);
|
465 |
|
|
CHECK_OCT_CONST(077);
|
466 |
|
|
CHECK_HEX_CONST(3f);
|
467 |
|
|
CHECK_OCT_CONST(0100);
|
468 |
|
|
CHECK_HEX_CONST(40);
|
469 |
|
|
CHECK_OCT_CONST(0177);
|
470 |
|
|
CHECK_HEX_CONST(7f);
|
471 |
|
|
CHECK_OCT_CONST(0200);
|
472 |
|
|
CHECK_HEX_CONST(80);
|
473 |
|
|
CHECK_OCT_CONST(0377);
|
474 |
|
|
CHECK_HEX_CONST(ff);
|
475 |
|
|
CHECK_OCT_CONST(0400);
|
476 |
|
|
CHECK_HEX_CONST(100);
|
477 |
|
|
CHECK_OCT_CONST(0777);
|
478 |
|
|
CHECK_HEX_CONST(1ff);
|
479 |
|
|
CHECK_OCT_CONST(01000);
|
480 |
|
|
CHECK_HEX_CONST(200);
|
481 |
|
|
CHECK_OCT_CONST(01777);
|
482 |
|
|
CHECK_HEX_CONST(3ff);
|
483 |
|
|
CHECK_OCT_CONST(02000);
|
484 |
|
|
CHECK_HEX_CONST(400);
|
485 |
|
|
CHECK_OCT_CONST(03777);
|
486 |
|
|
CHECK_HEX_CONST(7ff);
|
487 |
|
|
CHECK_OCT_CONST(04000);
|
488 |
|
|
CHECK_HEX_CONST(800);
|
489 |
|
|
CHECK_OCT_CONST(07777);
|
490 |
|
|
CHECK_HEX_CONST(fff);
|
491 |
|
|
CHECK_OCT_CONST(010000);
|
492 |
|
|
CHECK_HEX_CONST(1000);
|
493 |
|
|
CHECK_OCT_CONST(017777);
|
494 |
|
|
CHECK_HEX_CONST(1fff);
|
495 |
|
|
CHECK_OCT_CONST(020000);
|
496 |
|
|
CHECK_HEX_CONST(2000);
|
497 |
|
|
CHECK_OCT_CONST(037777);
|
498 |
|
|
CHECK_HEX_CONST(3fff);
|
499 |
|
|
CHECK_OCT_CONST(040000);
|
500 |
|
|
CHECK_HEX_CONST(4000);
|
501 |
|
|
CHECK_OCT_CONST(077777);
|
502 |
|
|
CHECK_HEX_CONST(7fff);
|
503 |
|
|
CHECK_OCT_CONST(0100000);
|
504 |
|
|
CHECK_HEX_CONST(8000);
|
505 |
|
|
CHECK_OCT_CONST(0177777);
|
506 |
|
|
CHECK_HEX_CONST(ffff);
|
507 |
|
|
CHECK_OCT_CONST(0200000);
|
508 |
|
|
CHECK_HEX_CONST(10000);
|
509 |
|
|
CHECK_OCT_CONST(0377777);
|
510 |
|
|
CHECK_HEX_CONST(1ffff);
|
511 |
|
|
CHECK_OCT_CONST(0400000);
|
512 |
|
|
CHECK_HEX_CONST(20000);
|
513 |
|
|
CHECK_OCT_CONST(0777777);
|
514 |
|
|
CHECK_HEX_CONST(3ffff);
|
515 |
|
|
CHECK_OCT_CONST(01000000);
|
516 |
|
|
CHECK_HEX_CONST(40000);
|
517 |
|
|
CHECK_OCT_CONST(01777777);
|
518 |
|
|
CHECK_HEX_CONST(7ffff);
|
519 |
|
|
CHECK_OCT_CONST(02000000);
|
520 |
|
|
CHECK_HEX_CONST(80000);
|
521 |
|
|
CHECK_OCT_CONST(03777777);
|
522 |
|
|
CHECK_HEX_CONST(fffff);
|
523 |
|
|
CHECK_OCT_CONST(04000000);
|
524 |
|
|
CHECK_HEX_CONST(100000);
|
525 |
|
|
CHECK_OCT_CONST(07777777);
|
526 |
|
|
CHECK_HEX_CONST(1fffff);
|
527 |
|
|
CHECK_OCT_CONST(010000000);
|
528 |
|
|
CHECK_HEX_CONST(200000);
|
529 |
|
|
CHECK_OCT_CONST(017777777);
|
530 |
|
|
CHECK_HEX_CONST(3fffff);
|
531 |
|
|
CHECK_OCT_CONST(020000000);
|
532 |
|
|
CHECK_HEX_CONST(400000);
|
533 |
|
|
CHECK_OCT_CONST(037777777);
|
534 |
|
|
CHECK_HEX_CONST(7fffff);
|
535 |
|
|
CHECK_OCT_CONST(040000000);
|
536 |
|
|
CHECK_HEX_CONST(800000);
|
537 |
|
|
CHECK_OCT_CONST(077777777);
|
538 |
|
|
CHECK_HEX_CONST(ffffff);
|
539 |
|
|
CHECK_OCT_CONST(0100000000);
|
540 |
|
|
CHECK_HEX_CONST(1000000);
|
541 |
|
|
CHECK_OCT_CONST(0177777777);
|
542 |
|
|
CHECK_HEX_CONST(1ffffff);
|
543 |
|
|
CHECK_OCT_CONST(0200000000);
|
544 |
|
|
CHECK_HEX_CONST(2000000);
|
545 |
|
|
CHECK_OCT_CONST(0377777777);
|
546 |
|
|
CHECK_HEX_CONST(3ffffff);
|
547 |
|
|
CHECK_OCT_CONST(0400000000);
|
548 |
|
|
CHECK_HEX_CONST(4000000);
|
549 |
|
|
CHECK_OCT_CONST(0777777777);
|
550 |
|
|
CHECK_HEX_CONST(7ffffff);
|
551 |
|
|
CHECK_OCT_CONST(01000000000);
|
552 |
|
|
CHECK_HEX_CONST(8000000);
|
553 |
|
|
CHECK_OCT_CONST(01777777777);
|
554 |
|
|
CHECK_HEX_CONST(fffffff);
|
555 |
|
|
CHECK_OCT_CONST(02000000000);
|
556 |
|
|
CHECK_HEX_CONST(10000000);
|
557 |
|
|
CHECK_OCT_CONST(03777777777);
|
558 |
|
|
CHECK_HEX_CONST(1fffffff);
|
559 |
|
|
CHECK_OCT_CONST(04000000000);
|
560 |
|
|
CHECK_HEX_CONST(20000000);
|
561 |
|
|
CHECK_OCT_CONST(07777777777);
|
562 |
|
|
CHECK_HEX_CONST(3fffffff);
|
563 |
|
|
CHECK_OCT_CONST(010000000000);
|
564 |
|
|
CHECK_HEX_CONST(40000000);
|
565 |
|
|
CHECK_OCT_CONST(017777777777);
|
566 |
|
|
CHECK_HEX_CONST(7fffffff);
|
567 |
|
|
CHECK_OCT_CONST(020000000000);
|
568 |
|
|
CHECK_HEX_CONST(80000000);
|
569 |
|
|
CHECK_OCT_CONST(037777777777);
|
570 |
|
|
CHECK_HEX_CONST(ffffffff);
|
571 |
|
|
#if LONG_AT_LEAST(33)
|
572 |
|
|
CHECK_OCT_CONST(040000000000);
|
573 |
|
|
CHECK_HEX_CONST(100000000);
|
574 |
|
|
CHECK_OCT_CONST(077777777777);
|
575 |
|
|
CHECK_HEX_CONST(1ffffffff);
|
576 |
|
|
#endif
|
577 |
|
|
#if LONG_AT_LEAST(34)
|
578 |
|
|
CHECK_OCT_CONST(0100000000000);
|
579 |
|
|
CHECK_HEX_CONST(200000000);
|
580 |
|
|
CHECK_OCT_CONST(0177777777777);
|
581 |
|
|
CHECK_HEX_CONST(3ffffffff);
|
582 |
|
|
#endif
|
583 |
|
|
#if LONG_AT_LEAST(35)
|
584 |
|
|
CHECK_OCT_CONST(0200000000000);
|
585 |
|
|
CHECK_HEX_CONST(400000000);
|
586 |
|
|
CHECK_OCT_CONST(0377777777777);
|
587 |
|
|
CHECK_HEX_CONST(7ffffffff);
|
588 |
|
|
#endif
|
589 |
|
|
#if LONG_AT_LEAST(36)
|
590 |
|
|
CHECK_OCT_CONST(0400000000000);
|
591 |
|
|
CHECK_HEX_CONST(800000000);
|
592 |
|
|
CHECK_OCT_CONST(0777777777777);
|
593 |
|
|
CHECK_HEX_CONST(fffffffff);
|
594 |
|
|
#endif
|
595 |
|
|
#if LONG_AT_LEAST(37)
|
596 |
|
|
CHECK_OCT_CONST(01000000000000);
|
597 |
|
|
CHECK_HEX_CONST(1000000000);
|
598 |
|
|
CHECK_OCT_CONST(01777777777777);
|
599 |
|
|
CHECK_HEX_CONST(1fffffffff);
|
600 |
|
|
#endif
|
601 |
|
|
#if LONG_AT_LEAST(38)
|
602 |
|
|
CHECK_OCT_CONST(02000000000000);
|
603 |
|
|
CHECK_HEX_CONST(2000000000);
|
604 |
|
|
CHECK_OCT_CONST(03777777777777);
|
605 |
|
|
CHECK_HEX_CONST(3fffffffff);
|
606 |
|
|
#endif
|
607 |
|
|
#if LONG_AT_LEAST(39)
|
608 |
|
|
CHECK_OCT_CONST(04000000000000);
|
609 |
|
|
CHECK_HEX_CONST(4000000000);
|
610 |
|
|
CHECK_OCT_CONST(07777777777777);
|
611 |
|
|
CHECK_HEX_CONST(7fffffffff);
|
612 |
|
|
#endif
|
613 |
|
|
#if LONG_AT_LEAST(40)
|
614 |
|
|
CHECK_OCT_CONST(010000000000000);
|
615 |
|
|
CHECK_HEX_CONST(8000000000);
|
616 |
|
|
CHECK_OCT_CONST(017777777777777);
|
617 |
|
|
CHECK_HEX_CONST(ffffffffff);
|
618 |
|
|
#endif
|
619 |
|
|
#if LONG_AT_LEAST(41)
|
620 |
|
|
CHECK_OCT_CONST(020000000000000);
|
621 |
|
|
CHECK_HEX_CONST(10000000000);
|
622 |
|
|
CHECK_OCT_CONST(037777777777777);
|
623 |
|
|
CHECK_HEX_CONST(1ffffffffff);
|
624 |
|
|
#endif
|
625 |
|
|
#if LONG_AT_LEAST(42)
|
626 |
|
|
CHECK_OCT_CONST(040000000000000);
|
627 |
|
|
CHECK_HEX_CONST(20000000000);
|
628 |
|
|
CHECK_OCT_CONST(077777777777777);
|
629 |
|
|
CHECK_HEX_CONST(3ffffffffff);
|
630 |
|
|
#endif
|
631 |
|
|
#if LONG_AT_LEAST(43)
|
632 |
|
|
CHECK_OCT_CONST(0100000000000000);
|
633 |
|
|
CHECK_HEX_CONST(40000000000);
|
634 |
|
|
CHECK_OCT_CONST(0177777777777777);
|
635 |
|
|
CHECK_HEX_CONST(7ffffffffff);
|
636 |
|
|
#endif
|
637 |
|
|
#if LONG_AT_LEAST(44)
|
638 |
|
|
CHECK_OCT_CONST(0200000000000000);
|
639 |
|
|
CHECK_HEX_CONST(80000000000);
|
640 |
|
|
CHECK_OCT_CONST(0377777777777777);
|
641 |
|
|
CHECK_HEX_CONST(fffffffffff);
|
642 |
|
|
#endif
|
643 |
|
|
#if LONG_AT_LEAST(45)
|
644 |
|
|
CHECK_OCT_CONST(0400000000000000);
|
645 |
|
|
CHECK_HEX_CONST(100000000000);
|
646 |
|
|
CHECK_OCT_CONST(0777777777777777);
|
647 |
|
|
CHECK_HEX_CONST(1fffffffffff);
|
648 |
|
|
#endif
|
649 |
|
|
#if LONG_AT_LEAST(46)
|
650 |
|
|
CHECK_OCT_CONST(01000000000000000);
|
651 |
|
|
CHECK_HEX_CONST(200000000000);
|
652 |
|
|
CHECK_OCT_CONST(01777777777777777);
|
653 |
|
|
CHECK_HEX_CONST(3fffffffffff);
|
654 |
|
|
#endif
|
655 |
|
|
#if LONG_AT_LEAST(47)
|
656 |
|
|
CHECK_OCT_CONST(02000000000000000);
|
657 |
|
|
CHECK_HEX_CONST(400000000000);
|
658 |
|
|
CHECK_OCT_CONST(03777777777777777);
|
659 |
|
|
CHECK_HEX_CONST(7fffffffffff);
|
660 |
|
|
#endif
|
661 |
|
|
#if LONG_AT_LEAST(48)
|
662 |
|
|
CHECK_OCT_CONST(04000000000000000);
|
663 |
|
|
CHECK_HEX_CONST(800000000000);
|
664 |
|
|
CHECK_OCT_CONST(07777777777777777);
|
665 |
|
|
CHECK_HEX_CONST(ffffffffffff);
|
666 |
|
|
#endif
|
667 |
|
|
#if LONG_AT_LEAST(49)
|
668 |
|
|
CHECK_OCT_CONST(010000000000000000);
|
669 |
|
|
CHECK_HEX_CONST(1000000000000);
|
670 |
|
|
CHECK_OCT_CONST(017777777777777777);
|
671 |
|
|
CHECK_HEX_CONST(1ffffffffffff);
|
672 |
|
|
#endif
|
673 |
|
|
#if LONG_AT_LEAST(50)
|
674 |
|
|
CHECK_OCT_CONST(020000000000000000);
|
675 |
|
|
CHECK_HEX_CONST(2000000000000);
|
676 |
|
|
CHECK_OCT_CONST(037777777777777777);
|
677 |
|
|
CHECK_HEX_CONST(3ffffffffffff);
|
678 |
|
|
#endif
|
679 |
|
|
#if LONG_AT_LEAST(51)
|
680 |
|
|
CHECK_OCT_CONST(040000000000000000);
|
681 |
|
|
CHECK_HEX_CONST(4000000000000);
|
682 |
|
|
CHECK_OCT_CONST(077777777777777777);
|
683 |
|
|
CHECK_HEX_CONST(7ffffffffffff);
|
684 |
|
|
#endif
|
685 |
|
|
#if LONG_AT_LEAST(52)
|
686 |
|
|
CHECK_OCT_CONST(0100000000000000000);
|
687 |
|
|
CHECK_HEX_CONST(8000000000000);
|
688 |
|
|
CHECK_OCT_CONST(0177777777777777777);
|
689 |
|
|
CHECK_HEX_CONST(fffffffffffff);
|
690 |
|
|
#endif
|
691 |
|
|
#if LONG_AT_LEAST(53)
|
692 |
|
|
CHECK_OCT_CONST(0200000000000000000);
|
693 |
|
|
CHECK_HEX_CONST(10000000000000);
|
694 |
|
|
CHECK_OCT_CONST(0377777777777777777);
|
695 |
|
|
CHECK_HEX_CONST(1fffffffffffff);
|
696 |
|
|
#endif
|
697 |
|
|
#if LONG_AT_LEAST(54)
|
698 |
|
|
CHECK_OCT_CONST(0400000000000000000);
|
699 |
|
|
CHECK_HEX_CONST(20000000000000);
|
700 |
|
|
CHECK_OCT_CONST(0777777777777777777);
|
701 |
|
|
CHECK_HEX_CONST(3fffffffffffff);
|
702 |
|
|
#endif
|
703 |
|
|
#if LONG_AT_LEAST(55)
|
704 |
|
|
CHECK_OCT_CONST(01000000000000000000);
|
705 |
|
|
CHECK_HEX_CONST(40000000000000);
|
706 |
|
|
CHECK_OCT_CONST(01777777777777777777);
|
707 |
|
|
CHECK_HEX_CONST(7fffffffffffff);
|
708 |
|
|
#endif
|
709 |
|
|
#if LONG_AT_LEAST(56)
|
710 |
|
|
CHECK_OCT_CONST(02000000000000000000);
|
711 |
|
|
CHECK_HEX_CONST(80000000000000);
|
712 |
|
|
CHECK_OCT_CONST(03777777777777777777);
|
713 |
|
|
CHECK_HEX_CONST(ffffffffffffff);
|
714 |
|
|
#endif
|
715 |
|
|
#if LONG_AT_LEAST(57)
|
716 |
|
|
CHECK_OCT_CONST(04000000000000000000);
|
717 |
|
|
CHECK_HEX_CONST(100000000000000);
|
718 |
|
|
CHECK_OCT_CONST(07777777777777777777);
|
719 |
|
|
CHECK_HEX_CONST(1ffffffffffffff);
|
720 |
|
|
#endif
|
721 |
|
|
#if LONG_AT_LEAST(58)
|
722 |
|
|
CHECK_OCT_CONST(010000000000000000000);
|
723 |
|
|
CHECK_HEX_CONST(200000000000000);
|
724 |
|
|
CHECK_OCT_CONST(017777777777777777777);
|
725 |
|
|
CHECK_HEX_CONST(3ffffffffffffff);
|
726 |
|
|
#endif
|
727 |
|
|
#if LONG_AT_LEAST(59)
|
728 |
|
|
CHECK_OCT_CONST(020000000000000000000);
|
729 |
|
|
CHECK_HEX_CONST(400000000000000);
|
730 |
|
|
CHECK_OCT_CONST(037777777777777777777);
|
731 |
|
|
CHECK_HEX_CONST(7ffffffffffffff);
|
732 |
|
|
#endif
|
733 |
|
|
#if LONG_AT_LEAST(60)
|
734 |
|
|
CHECK_OCT_CONST(040000000000000000000);
|
735 |
|
|
CHECK_HEX_CONST(800000000000000);
|
736 |
|
|
CHECK_OCT_CONST(077777777777777777777);
|
737 |
|
|
CHECK_HEX_CONST(fffffffffffffff);
|
738 |
|
|
#endif
|
739 |
|
|
#if LONG_AT_LEAST(61)
|
740 |
|
|
CHECK_OCT_CONST(0100000000000000000000);
|
741 |
|
|
CHECK_HEX_CONST(1000000000000000);
|
742 |
|
|
CHECK_OCT_CONST(0177777777777777777777);
|
743 |
|
|
CHECK_HEX_CONST(1fffffffffffffff);
|
744 |
|
|
#endif
|
745 |
|
|
#if LONG_AT_LEAST(62)
|
746 |
|
|
CHECK_OCT_CONST(0200000000000000000000);
|
747 |
|
|
CHECK_HEX_CONST(2000000000000000);
|
748 |
|
|
CHECK_OCT_CONST(0377777777777777777777);
|
749 |
|
|
CHECK_HEX_CONST(3fffffffffffffff);
|
750 |
|
|
#endif
|
751 |
|
|
#if LONG_AT_LEAST(63)
|
752 |
|
|
CHECK_OCT_CONST(0400000000000000000000);
|
753 |
|
|
CHECK_HEX_CONST(4000000000000000);
|
754 |
|
|
CHECK_OCT_CONST(0777777777777777777777);
|
755 |
|
|
CHECK_HEX_CONST(7fffffffffffffff);
|
756 |
|
|
#endif
|
757 |
|
|
#if LONG_AT_LEAST(64)
|
758 |
|
|
CHECK_OCT_CONST(01000000000000000000000);
|
759 |
|
|
CHECK_HEX_CONST(8000000000000000);
|
760 |
|
|
CHECK_OCT_CONST(01777777777777777777777);
|
761 |
|
|
CHECK_HEX_CONST(ffffffffffffffff);
|
762 |
|
|
#endif
|
763 |
|
|
}
|