gcc/testsuite/gcc.dg/bitint-32.c
raw| 1 | /* PR c/102989 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-std=c23" } */ |
| 4 | |
| 5 | #include <limits.h> |
| 6 | |
| 7 | #ifndef BITINT_MAXWIDTH |
| 8 | #error BITINT_MAXWIDTH not defined |
| 9 | #elif BITINT_MAXWIDTH < ULLONG_WIDTH |
| 10 | #error BITINT_MAXWIDTH smaller than ULLONG_WIDTH |
| 11 | #endif |
| 12 | |
| 13 | _BitInt(BITINT_MAXWIDTH) a; |
| 14 | _BitInt(BITINT_MAXWIDTH + 1) b; /* { dg-error "'_BitInt' argument '\[0-9]+' is larger than 'BITINT_MAXWIDTH' '\[0-9]+'" } */ |