1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // test <inttypes.h> |
10 | |
11 | #include <inttypes.h> |
12 | |
13 | #include "test_macros.h" |
14 | |
15 | #ifndef INT8_MIN |
16 | #error INT8_MIN not defined |
17 | #endif |
18 | |
19 | #ifndef INT16_MIN |
20 | #error INT16_MIN not defined |
21 | #endif |
22 | |
23 | #ifndef INT32_MIN |
24 | #error INT32_MIN not defined |
25 | #endif |
26 | |
27 | #ifndef INT64_MIN |
28 | #error INT64_MIN not defined |
29 | #endif |
30 | |
31 | #ifndef INT8_MAX |
32 | #error INT8_MAX not defined |
33 | #endif |
34 | |
35 | #ifndef INT16_MAX |
36 | #error INT16_MAX not defined |
37 | #endif |
38 | |
39 | #ifndef INT32_MAX |
40 | #error INT32_MAX not defined |
41 | #endif |
42 | |
43 | #ifndef INT64_MAX |
44 | #error INT64_MAX not defined |
45 | #endif |
46 | |
47 | #ifndef UINT8_MAX |
48 | #error UINT8_MAX not defined |
49 | #endif |
50 | |
51 | #ifndef UINT16_MAX |
52 | #error UINT16_MAX not defined |
53 | #endif |
54 | |
55 | #ifndef UINT32_MAX |
56 | #error UINT32_MAX not defined |
57 | #endif |
58 | |
59 | #ifndef UINT64_MAX |
60 | #error UINT64_MAX not defined |
61 | #endif |
62 | |
63 | #ifndef INT_LEAST8_MIN |
64 | #error INT_LEAST8_MIN not defined |
65 | #endif |
66 | |
67 | #ifndef INT_LEAST16_MIN |
68 | #error INT_LEAST16_MIN not defined |
69 | #endif |
70 | |
71 | #ifndef INT_LEAST32_MIN |
72 | #error INT_LEAST32_MIN not defined |
73 | #endif |
74 | |
75 | #ifndef INT_LEAST64_MIN |
76 | #error INT_LEAST64_MIN not defined |
77 | #endif |
78 | |
79 | #ifndef INT_LEAST8_MAX |
80 | #error INT_LEAST8_MAX not defined |
81 | #endif |
82 | |
83 | #ifndef INT_LEAST16_MAX |
84 | #error INT_LEAST16_MAX not defined |
85 | #endif |
86 | |
87 | #ifndef INT_LEAST32_MAX |
88 | #error INT_LEAST32_MAX not defined |
89 | #endif |
90 | |
91 | #ifndef INT_LEAST64_MAX |
92 | #error INT_LEAST64_MAX not defined |
93 | #endif |
94 | |
95 | #ifndef UINT_LEAST8_MAX |
96 | #error UINT_LEAST8_MAX not defined |
97 | #endif |
98 | |
99 | #ifndef UINT_LEAST16_MAX |
100 | #error UINT_LEAST16_MAX not defined |
101 | #endif |
102 | |
103 | #ifndef UINT_LEAST32_MAX |
104 | #error UINT_LEAST32_MAX not defined |
105 | #endif |
106 | |
107 | #ifndef UINT_LEAST64_MAX |
108 | #error UINT_LEAST64_MAX not defined |
109 | #endif |
110 | |
111 | #ifndef INT_FAST8_MIN |
112 | #error INT_FAST8_MIN not defined |
113 | #endif |
114 | |
115 | #ifndef INT_FAST16_MIN |
116 | #error INT_FAST16_MIN not defined |
117 | #endif |
118 | |
119 | #ifndef INT_FAST32_MIN |
120 | #error INT_FAST32_MIN not defined |
121 | #endif |
122 | |
123 | #ifndef INT_FAST64_MIN |
124 | #error INT_FAST64_MIN not defined |
125 | #endif |
126 | |
127 | #ifndef INT_FAST8_MAX |
128 | #error INT_FAST8_MAX not defined |
129 | #endif |
130 | |
131 | #ifndef INT_FAST16_MAX |
132 | #error INT_FAST16_MAX not defined |
133 | #endif |
134 | |
135 | #ifndef INT_FAST32_MAX |
136 | #error INT_FAST32_MAX not defined |
137 | #endif |
138 | |
139 | #ifndef INT_FAST64_MAX |
140 | #error INT_FAST64_MAX not defined |
141 | #endif |
142 | |
143 | #ifndef UINT_FAST8_MAX |
144 | #error UINT_FAST8_MAX not defined |
145 | #endif |
146 | |
147 | #ifndef UINT_FAST16_MAX |
148 | #error UINT_FAST16_MAX not defined |
149 | #endif |
150 | |
151 | #ifndef UINT_FAST32_MAX |
152 | #error UINT_FAST32_MAX not defined |
153 | #endif |
154 | |
155 | #ifndef UINT_FAST64_MAX |
156 | #error UINT_FAST64_MAX not defined |
157 | #endif |
158 | |
159 | #ifndef INTPTR_MIN |
160 | #error INTPTR_MIN not defined |
161 | #endif |
162 | |
163 | #ifndef INTPTR_MAX |
164 | #error INTPTR_MAX not defined |
165 | #endif |
166 | |
167 | #ifndef UINTPTR_MAX |
168 | #error UINTPTR_MAX not defined |
169 | #endif |
170 | |
171 | #ifndef INTMAX_MIN |
172 | #error INTMAX_MIN not defined |
173 | #endif |
174 | |
175 | #ifndef INTMAX_MAX |
176 | #error INTMAX_MAX not defined |
177 | #endif |
178 | |
179 | #ifndef UINTMAX_MAX |
180 | #error UINTMAX_MAX not defined |
181 | #endif |
182 | |
183 | #ifndef PTRDIFF_MIN |
184 | #error PTRDIFF_MIN not defined |
185 | #endif |
186 | |
187 | #ifndef PTRDIFF_MAX |
188 | #error PTRDIFF_MAX not defined |
189 | #endif |
190 | |
191 | #ifndef SIG_ATOMIC_MIN |
192 | #error SIG_ATOMIC_MIN not defined |
193 | #endif |
194 | |
195 | #ifndef SIG_ATOMIC_MAX |
196 | #error SIG_ATOMIC_MAX not defined |
197 | #endif |
198 | |
199 | #ifndef SIZE_MAX |
200 | #error SIZE_MAX not defined |
201 | #endif |
202 | |
203 | #ifndef WCHAR_MIN |
204 | #error WCHAR_MIN not defined |
205 | #endif |
206 | |
207 | #ifndef WCHAR_MAX |
208 | #error WCHAR_MAX not defined |
209 | #endif |
210 | |
211 | #ifndef WINT_MIN |
212 | #error WINT_MIN not defined |
213 | #endif |
214 | |
215 | #ifndef WINT_MAX |
216 | #error WINT_MAX not defined |
217 | #endif |
218 | |
219 | #ifndef INT8_C |
220 | #error INT8_C not defined |
221 | #endif |
222 | |
223 | #ifndef INT16_C |
224 | #error INT16_C not defined |
225 | #endif |
226 | |
227 | #ifndef INT32_C |
228 | #error INT32_C not defined |
229 | #endif |
230 | |
231 | #ifndef INT64_C |
232 | #error INT64_C not defined |
233 | #endif |
234 | |
235 | #ifndef UINT8_C |
236 | #error UINT8_C not defined |
237 | #endif |
238 | |
239 | #ifndef UINT16_C |
240 | #error UINT16_C not defined |
241 | #endif |
242 | |
243 | #ifndef UINT32_C |
244 | #error UINT32_C not defined |
245 | #endif |
246 | |
247 | #ifndef UINT64_C |
248 | #error UINT64_C not defined |
249 | #endif |
250 | |
251 | #ifndef INTMAX_C |
252 | #error INTMAX_C not defined |
253 | #endif |
254 | |
255 | #ifndef UINTMAX_C |
256 | #error UINTMAX_C not defined |
257 | #endif |
258 | |
259 | #ifndef PRId8 |
260 | #error PRId8 not defined |
261 | #endif |
262 | |
263 | #ifndef PRId16 |
264 | #error PRId16 not defined |
265 | #endif |
266 | |
267 | #ifndef PRId32 |
268 | #error PRId32 not defined |
269 | #endif |
270 | |
271 | #ifndef PRId64 |
272 | #error PRId64 not defined |
273 | #endif |
274 | |
275 | #ifndef PRIdLEAST8 |
276 | #error PRIdLEAST8 not defined |
277 | #endif |
278 | |
279 | #ifndef PRIdLEAST16 |
280 | #error PRIdLEAST16 not defined |
281 | #endif |
282 | |
283 | #ifndef PRIdLEAST32 |
284 | #error PRIdLEAST32 not defined |
285 | #endif |
286 | |
287 | #ifndef PRIdLEAST64 |
288 | #error PRIdLEAST64 not defined |
289 | #endif |
290 | |
291 | #ifndef PRIdFAST8 |
292 | #error PRIdFAST8 not defined |
293 | #endif |
294 | |
295 | #ifndef PRIdFAST16 |
296 | #error PRIdFAST16 not defined |
297 | #endif |
298 | |
299 | #ifndef PRIdFAST32 |
300 | #error PRIdFAST32 not defined |
301 | #endif |
302 | |
303 | #ifndef PRIdFAST64 |
304 | #error PRIdFAST64 not defined |
305 | #endif |
306 | |
307 | #ifndef PRIdMAX |
308 | #error PRIdMAX not defined |
309 | #endif |
310 | |
311 | #ifndef PRIdPTR |
312 | #error PRIdPTR not defined |
313 | #endif |
314 | |
315 | #ifndef PRIi8 |
316 | #error PRIi8 not defined |
317 | #endif |
318 | |
319 | #ifndef PRIi16 |
320 | #error PRIi16 not defined |
321 | #endif |
322 | |
323 | #ifndef PRIi32 |
324 | #error PRIi32 not defined |
325 | #endif |
326 | |
327 | #ifndef PRIi64 |
328 | #error PRIi64 not defined |
329 | #endif |
330 | |
331 | #ifndef PRIiLEAST8 |
332 | #error PRIiLEAST8 not defined |
333 | #endif |
334 | |
335 | #ifndef PRIiLEAST16 |
336 | #error PRIiLEAST16 not defined |
337 | #endif |
338 | |
339 | #ifndef PRIiLEAST32 |
340 | #error PRIiLEAST32 not defined |
341 | #endif |
342 | |
343 | #ifndef PRIiLEAST64 |
344 | #error PRIiLEAST64 not defined |
345 | #endif |
346 | |
347 | #ifndef PRIiFAST8 |
348 | #error PRIiFAST8 not defined |
349 | #endif |
350 | |
351 | #ifndef PRIiFAST16 |
352 | #error PRIiFAST16 not defined |
353 | #endif |
354 | |
355 | #ifndef PRIiFAST32 |
356 | #error PRIiFAST32 not defined |
357 | #endif |
358 | |
359 | #ifndef PRIiFAST64 |
360 | #error PRIiFAST64 not defined |
361 | #endif |
362 | |
363 | #ifndef PRIiMAX |
364 | #error PRIiMAX not defined |
365 | #endif |
366 | |
367 | #ifndef PRIiPTR |
368 | #error PRIiPTR not defined |
369 | #endif |
370 | |
371 | #ifndef PRIo8 |
372 | #error PRIo8 not defined |
373 | #endif |
374 | |
375 | #ifndef PRIo16 |
376 | #error PRIo16 not defined |
377 | #endif |
378 | |
379 | #ifndef PRIo32 |
380 | #error PRIo32 not defined |
381 | #endif |
382 | |
383 | #ifndef PRIo64 |
384 | #error PRIo64 not defined |
385 | #endif |
386 | |
387 | #ifndef PRIoLEAST8 |
388 | #error PRIoLEAST8 not defined |
389 | #endif |
390 | |
391 | #ifndef PRIoLEAST16 |
392 | #error PRIoLEAST16 not defined |
393 | #endif |
394 | |
395 | #ifndef PRIoLEAST32 |
396 | #error PRIoLEAST32 not defined |
397 | #endif |
398 | |
399 | #ifndef PRIoLEAST64 |
400 | #error PRIoLEAST64 not defined |
401 | #endif |
402 | |
403 | #ifndef PRIoFAST8 |
404 | #error PRIoFAST8 not defined |
405 | #endif |
406 | |
407 | #ifndef PRIoFAST16 |
408 | #error PRIoFAST16 not defined |
409 | #endif |
410 | |
411 | #ifndef PRIoFAST32 |
412 | #error PRIoFAST32 not defined |
413 | #endif |
414 | |
415 | #ifndef PRIoFAST64 |
416 | #error PRIoFAST64 not defined |
417 | #endif |
418 | |
419 | #ifndef PRIoMAX |
420 | #error PRIoMAX not defined |
421 | #endif |
422 | |
423 | #ifndef PRIoPTR |
424 | #error PRIoPTR not defined |
425 | #endif |
426 | |
427 | #ifndef PRIu8 |
428 | #error PRIu8 not defined |
429 | #endif |
430 | |
431 | #ifndef PRIu16 |
432 | #error PRIu16 not defined |
433 | #endif |
434 | |
435 | #ifndef PRIu32 |
436 | #error PRIu32 not defined |
437 | #endif |
438 | |
439 | #ifndef PRIu64 |
440 | #error PRIu64 not defined |
441 | #endif |
442 | |
443 | #ifndef PRIuLEAST8 |
444 | #error PRIuLEAST8 not defined |
445 | #endif |
446 | |
447 | #ifndef PRIuLEAST16 |
448 | #error PRIuLEAST16 not defined |
449 | #endif |
450 | |
451 | #ifndef PRIuLEAST32 |
452 | #error PRIuLEAST32 not defined |
453 | #endif |
454 | |
455 | #ifndef PRIuLEAST64 |
456 | #error PRIuLEAST64 not defined |
457 | #endif |
458 | |
459 | #ifndef PRIuFAST8 |
460 | #error PRIuFAST8 not defined |
461 | #endif |
462 | |
463 | #ifndef PRIuFAST16 |
464 | #error PRIuFAST16 not defined |
465 | #endif |
466 | |
467 | #ifndef PRIuFAST32 |
468 | #error PRIuFAST32 not defined |
469 | #endif |
470 | |
471 | #ifndef PRIuFAST64 |
472 | #error PRIuFAST64 not defined |
473 | #endif |
474 | |
475 | #ifndef PRIuMAX |
476 | #error PRIuMAX not defined |
477 | #endif |
478 | |
479 | #ifndef PRIuPTR |
480 | #error PRIuPTR not defined |
481 | #endif |
482 | |
483 | #ifndef PRIx8 |
484 | #error PRIx8 not defined |
485 | #endif |
486 | |
487 | #ifndef PRIx16 |
488 | #error PRIx16 not defined |
489 | #endif |
490 | |
491 | #ifndef PRIx32 |
492 | #error PRIx32 not defined |
493 | #endif |
494 | |
495 | #ifndef PRIx64 |
496 | #error PRIx64 not defined |
497 | #endif |
498 | |
499 | #ifndef PRIxLEAST8 |
500 | #error PRIxLEAST8 not defined |
501 | #endif |
502 | |
503 | #ifndef PRIxLEAST16 |
504 | #error PRIxLEAST16 not defined |
505 | #endif |
506 | |
507 | #ifndef PRIxLEAST32 |
508 | #error PRIxLEAST32 not defined |
509 | #endif |
510 | |
511 | #ifndef PRIxLEAST64 |
512 | #error PRIxLEAST64 not defined |
513 | #endif |
514 | |
515 | #ifndef PRIxFAST8 |
516 | #error PRIxFAST8 not defined |
517 | #endif |
518 | |
519 | #ifndef PRIxFAST16 |
520 | #error PRIxFAST16 not defined |
521 | #endif |
522 | |
523 | #ifndef PRIxFAST32 |
524 | #error PRIxFAST32 not defined |
525 | #endif |
526 | |
527 | #ifndef PRIxFAST64 |
528 | #error PRIxFAST64 not defined |
529 | #endif |
530 | |
531 | #ifndef PRIxMAX |
532 | #error PRIxMAX not defined |
533 | #endif |
534 | |
535 | #ifndef PRIxPTR |
536 | #error PRIxPTR not defined |
537 | #endif |
538 | |
539 | #ifndef PRIX8 |
540 | #error PRIX8 not defined |
541 | #endif |
542 | |
543 | #ifndef PRIX16 |
544 | #error PRIX16 not defined |
545 | #endif |
546 | |
547 | #ifndef PRIX32 |
548 | #error PRIX32 not defined |
549 | #endif |
550 | |
551 | #ifndef PRIX64 |
552 | #error PRIX64 not defined |
553 | #endif |
554 | |
555 | #ifndef PRIXLEAST8 |
556 | #error PRIXLEAST8 not defined |
557 | #endif |
558 | |
559 | #ifndef PRIXLEAST16 |
560 | #error PRIXLEAST16 not defined |
561 | #endif |
562 | |
563 | #ifndef PRIXLEAST32 |
564 | #error PRIXLEAST32 not defined |
565 | #endif |
566 | |
567 | #ifndef PRIXLEAST64 |
568 | #error PRIXLEAST64 not defined |
569 | #endif |
570 | |
571 | #ifndef PRIXFAST8 |
572 | #error PRIXFAST8 not defined |
573 | #endif |
574 | |
575 | #ifndef PRIXFAST16 |
576 | #error PRIXFAST16 not defined |
577 | #endif |
578 | |
579 | #ifndef PRIXFAST32 |
580 | #error PRIXFAST32 not defined |
581 | #endif |
582 | |
583 | #ifndef PRIXFAST64 |
584 | #error PRIXFAST64 not defined |
585 | #endif |
586 | |
587 | #ifndef PRIXMAX |
588 | #error PRIXMAX not defined |
589 | #endif |
590 | |
591 | #ifndef PRIXPTR |
592 | #error PRIXPTR not defined |
593 | #endif |
594 | |
595 | #ifndef SCNd8 |
596 | #error SCNd8 not defined |
597 | #endif |
598 | |
599 | #ifndef SCNd16 |
600 | #error SCNd16 not defined |
601 | #endif |
602 | |
603 | #ifndef SCNd32 |
604 | #error SCNd32 not defined |
605 | #endif |
606 | |
607 | #ifndef SCNd64 |
608 | #error SCNd64 not defined |
609 | #endif |
610 | |
611 | #ifndef SCNdLEAST8 |
612 | #error SCNdLEAST8 not defined |
613 | #endif |
614 | |
615 | #ifndef SCNdLEAST16 |
616 | #error SCNdLEAST16 not defined |
617 | #endif |
618 | |
619 | #ifndef SCNdLEAST32 |
620 | #error SCNdLEAST32 not defined |
621 | #endif |
622 | |
623 | #ifndef SCNdLEAST64 |
624 | #error SCNdLEAST64 not defined |
625 | #endif |
626 | |
627 | #ifndef SCNdFAST8 |
628 | #error SCNdFAST8 not defined |
629 | #endif |
630 | |
631 | #ifndef SCNdFAST16 |
632 | #error SCNdFAST16 not defined |
633 | #endif |
634 | |
635 | #ifndef SCNdFAST32 |
636 | #error SCNdFAST32 not defined |
637 | #endif |
638 | |
639 | #ifndef SCNdFAST64 |
640 | #error SCNdFAST64 not defined |
641 | #endif |
642 | |
643 | #ifndef SCNdMAX |
644 | #error SCNdMAX not defined |
645 | #endif |
646 | |
647 | #ifndef SCNdPTR |
648 | #error SCNdPTR not defined |
649 | #endif |
650 | |
651 | #ifndef SCNi8 |
652 | #error SCNi8 not defined |
653 | #endif |
654 | |
655 | #ifndef SCNi16 |
656 | #error SCNi16 not defined |
657 | #endif |
658 | |
659 | #ifndef SCNi32 |
660 | #error SCNi32 not defined |
661 | #endif |
662 | |
663 | #ifndef SCNi64 |
664 | #error SCNi64 not defined |
665 | #endif |
666 | |
667 | #ifndef SCNiLEAST8 |
668 | #error SCNiLEAST8 not defined |
669 | #endif |
670 | |
671 | #ifndef SCNiLEAST16 |
672 | #error SCNiLEAST16 not defined |
673 | #endif |
674 | |
675 | #ifndef SCNiLEAST32 |
676 | #error SCNiLEAST32 not defined |
677 | #endif |
678 | |
679 | #ifndef SCNiLEAST64 |
680 | #error SCNiLEAST64 not defined |
681 | #endif |
682 | |
683 | #ifndef SCNiFAST8 |
684 | #error SCNiFAST8 not defined |
685 | #endif |
686 | |
687 | #ifndef SCNiFAST16 |
688 | #error SCNiFAST16 not defined |
689 | #endif |
690 | |
691 | #ifndef SCNiFAST32 |
692 | #error SCNiFAST32 not defined |
693 | #endif |
694 | |
695 | #ifndef SCNiFAST64 |
696 | #error SCNiFAST64 not defined |
697 | #endif |
698 | |
699 | #ifndef SCNiMAX |
700 | #error SCNiMAX not defined |
701 | #endif |
702 | |
703 | #ifndef SCNiPTR |
704 | #error SCNiPTR not defined |
705 | #endif |
706 | |
707 | #ifndef SCNo8 |
708 | #error SCNo8 not defined |
709 | #endif |
710 | |
711 | #ifndef SCNo16 |
712 | #error SCNo16 not defined |
713 | #endif |
714 | |
715 | #ifndef SCNo32 |
716 | #error SCNo32 not defined |
717 | #endif |
718 | |
719 | #ifndef SCNo64 |
720 | #error SCNo64 not defined |
721 | #endif |
722 | |
723 | #ifndef SCNoLEAST8 |
724 | #error SCNoLEAST8 not defined |
725 | #endif |
726 | |
727 | #ifndef SCNoLEAST16 |
728 | #error SCNoLEAST16 not defined |
729 | #endif |
730 | |
731 | #ifndef SCNoLEAST32 |
732 | #error SCNoLEAST32 not defined |
733 | #endif |
734 | |
735 | #ifndef SCNoLEAST64 |
736 | #error SCNoLEAST64 not defined |
737 | #endif |
738 | |
739 | #ifndef SCNoFAST8 |
740 | #error SCNoFAST8 not defined |
741 | #endif |
742 | |
743 | #ifndef SCNoFAST16 |
744 | #error SCNoFAST16 not defined |
745 | #endif |
746 | |
747 | #ifndef SCNoFAST32 |
748 | #error SCNoFAST32 not defined |
749 | #endif |
750 | |
751 | #ifndef SCNoFAST64 |
752 | #error SCNoFAST64 not defined |
753 | #endif |
754 | |
755 | #ifndef SCNoMAX |
756 | #error SCNoMAX not defined |
757 | #endif |
758 | |
759 | #ifndef SCNoPTR |
760 | #error SCNoPTR not defined |
761 | #endif |
762 | |
763 | #ifndef SCNu8 |
764 | #error SCNu8 not defined |
765 | #endif |
766 | |
767 | #ifndef SCNu16 |
768 | #error SCNu16 not defined |
769 | #endif |
770 | |
771 | #ifndef SCNu32 |
772 | #error SCNu32 not defined |
773 | #endif |
774 | |
775 | #ifndef SCNu64 |
776 | #error SCNu64 not defined |
777 | #endif |
778 | |
779 | #ifndef SCNuLEAST8 |
780 | #error SCNuLEAST8 not defined |
781 | #endif |
782 | |
783 | #ifndef SCNuLEAST16 |
784 | #error SCNuLEAST16 not defined |
785 | #endif |
786 | |
787 | #ifndef SCNuLEAST32 |
788 | #error SCNuLEAST32 not defined |
789 | #endif |
790 | |
791 | #ifndef SCNuLEAST64 |
792 | #error SCNuLEAST64 not defined |
793 | #endif |
794 | |
795 | #ifndef SCNuFAST8 |
796 | #error SCNuFAST8 not defined |
797 | #endif |
798 | |
799 | #ifndef SCNuFAST16 |
800 | #error SCNuFAST16 not defined |
801 | #endif |
802 | |
803 | #ifndef SCNuFAST32 |
804 | #error SCNuFAST32 not defined |
805 | #endif |
806 | |
807 | #ifndef SCNuFAST64 |
808 | #error SCNuFAST64 not defined |
809 | #endif |
810 | |
811 | #ifndef SCNuMAX |
812 | #error SCNuMAX not defined |
813 | #endif |
814 | |
815 | #ifndef SCNuPTR |
816 | #error SCNuPTR not defined |
817 | #endif |
818 | |
819 | #ifndef SCNx8 |
820 | #error SCNx8 not defined |
821 | #endif |
822 | |
823 | #ifndef SCNx16 |
824 | #error SCNx16 not defined |
825 | #endif |
826 | |
827 | #ifndef SCNx32 |
828 | #error SCNx32 not defined |
829 | #endif |
830 | |
831 | #ifndef SCNx64 |
832 | #error SCNx64 not defined |
833 | #endif |
834 | |
835 | #ifndef SCNxLEAST8 |
836 | #error SCNxLEAST8 not defined |
837 | #endif |
838 | |
839 | #ifndef SCNxLEAST16 |
840 | #error SCNxLEAST16 not defined |
841 | #endif |
842 | |
843 | #ifndef SCNxLEAST32 |
844 | #error SCNxLEAST32 not defined |
845 | #endif |
846 | |
847 | #ifndef SCNxLEAST64 |
848 | #error SCNxLEAST64 not defined |
849 | #endif |
850 | |
851 | #ifndef SCNxFAST8 |
852 | #error SCNxFAST8 not defined |
853 | #endif |
854 | |
855 | #ifndef SCNxFAST16 |
856 | #error SCNxFAST16 not defined |
857 | #endif |
858 | |
859 | #ifndef SCNxFAST32 |
860 | #error SCNxFAST32 not defined |
861 | #endif |
862 | |
863 | #ifndef SCNxFAST64 |
864 | #error SCNxFAST64 not defined |
865 | #endif |
866 | |
867 | #ifndef SCNxMAX |
868 | #error SCNxMAX not defined |
869 | #endif |
870 | |
871 | #ifndef SCNxPTR |
872 | #error SCNxPTR not defined |
873 | #endif |
874 | |
875 | void f() { |
876 | { int8_t x = 0; (void)x; } |
877 | { int16_t x = 0; (void)x; } |
878 | { int32_t x = 0; (void)x; } |
879 | { int64_t x = 0; (void)x; } |
880 | |
881 | { uint8_t x = 0; (void)x; } |
882 | { uint16_t x = 0; (void)x; } |
883 | { uint32_t x = 0; (void)x; } |
884 | { uint64_t x = 0; (void)x; } |
885 | |
886 | { int_least8_t x = 0; (void)x; } |
887 | { int_least16_t x = 0; (void)x; } |
888 | { int_least32_t x = 0; (void)x; } |
889 | { int_least64_t x = 0; (void)x; } |
890 | |
891 | { uint_least8_t x = 0; (void)x; } |
892 | { uint_least16_t x = 0; (void)x; } |
893 | { uint_least32_t x = 0; (void)x; } |
894 | { uint_least64_t x = 0; (void)x; } |
895 | |
896 | { int_fast8_t x = 0; (void)x; } |
897 | { int_fast16_t x = 0; (void)x; } |
898 | { int_fast32_t x = 0; (void)x; } |
899 | { int_fast64_t x = 0; (void)x; } |
900 | |
901 | { uint_fast8_t x = 0; (void)x; } |
902 | { uint_fast16_t x = 0; (void)x; } |
903 | { uint_fast32_t x = 0; (void)x; } |
904 | { uint_fast64_t x = 0; (void)x; } |
905 | |
906 | { intptr_t x = 0; (void)x; } |
907 | { uintptr_t x = 0; (void)x; } |
908 | { intmax_t x = 0; (void)x; } |
909 | { uintmax_t x = 0; (void)x; } |
910 | |
911 | { imaxdiv_t x = {}; (void)x; } |
912 | |
913 | intmax_t i = 0; (void)i; |
914 | ASSERT_SAME_TYPE(intmax_t, decltype(imaxabs(i))); |
915 | ASSERT_SAME_TYPE(imaxdiv_t, decltype(imaxdiv(i, i))); |
916 | ASSERT_SAME_TYPE(intmax_t, decltype(strtoimax("" , (char**)0, 0))); |
917 | ASSERT_SAME_TYPE(uintmax_t, decltype(strtoumax("" , (char**)0, 0))); |
918 | #ifndef TEST_HAS_NO_WIDE_CHARACTERS |
919 | ASSERT_SAME_TYPE(intmax_t, decltype(wcstoimax(L"" , (wchar_t**)0, 0))); |
920 | ASSERT_SAME_TYPE(uintmax_t, decltype(wcstoumax(L"" , (wchar_t**)0, 0))); |
921 | #endif |
922 | } |
923 | |