The standard uintXX_t types are provided in stdint.h (C, C ++ 98) or cstdint (C ++ 11).
In 8-bit data, the 24-bit AVR address architecture, GCC provides a built-in 24-bit integer, but it is not portable. See http://gcc.gnu.org/wiki/avr-gcc for more details.
There are no standard 24-bit or 48-bit integer types provided by GCC or MinGW in a platform-independent way, but one simple way to get a portable 24-bit number on almost any platform is to use a bit field:
struct bitfield24 { uint32_t value : 24; }; bitfield24 a; a.value = 0xffffff; a.value += 1; assert(a == 0);
The same can be done for 48 bits using uint64_t as the base.
source share