1 /** integer constants of bit-precise integer types
3 width: 2, 4, 6, 7, 8, 9, 15, 16, 17, 24, 32, 33, 40, 48, 63, 64, 65
8 #pragma disable_warning 264
9 #pragma disable_warning 273
13 // clang 11 supports bit-precise types, but deviates a bit from C23.
14 #if __clang_major__ == 11
15 #define __SDCC_BITINT_MAXWIDTH 128
16 #define _BitInt _ExtInt
19 #if __SDCC_BITINT_MAXWIDTH >= {width} // TODO: When we can regression-test in --std-c23 mode, use the standard macro from limits.h instead!
21 typedef unsigned _BitInt({width
}) bitinttype
;
23 volatile bitinttype i
= 0x01wb
;
24 volatile bitinttype j
= 0x0'1'0wb
;
25 volatile bitinttype k
= 0b1wb
;
26 volatile bitinttype l
= 0x01wbu
;
27 volatile bitinttype m
= 0x0'1'0wbu
;
28 volatile bitinttype n
= 0b1uwb
;
34 #if __SDCC_BITINT_MAXWIDTH >= {width}
36 ASSERT(j
== (bitinttype
)0x0'1'0wb
);
39 ASSERT(m
== (bitinttype
)0x0'1'0wbu
);