mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[liba] Add intptr_t and uintptr_t to stdint.h
Change-Id: I7bb28aa1d449da0413c751e66e69f17dc9492d8f
This commit is contained in:
committed by
Romain Goyet
parent
15725a5cc8
commit
878d86df71
@@ -11,6 +11,9 @@ typedef signed short int16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef signed long long int64_t;
|
||||
|
||||
typedef unsigned int uintptr_t;
|
||||
typedef signed int intptr_t;
|
||||
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
@@ -13,6 +13,9 @@ QUIZ_CASE(liba_stdint_size) {
|
||||
assert(sizeof(int16_t) == 2);
|
||||
assert(sizeof(int32_t) == 4);
|
||||
assert(sizeof(int64_t) == 8);
|
||||
|
||||
assert(sizeof(uintptr_t) == sizeof(void *));
|
||||
assert(sizeof(intptr_t) == sizeof(void *));
|
||||
}
|
||||
|
||||
QUIZ_CASE(liba_stdint_signedness) {
|
||||
@@ -25,4 +28,7 @@ QUIZ_CASE(liba_stdint_signedness) {
|
||||
assert_unsigned(uint16_t);
|
||||
assert_unsigned(uint32_t);
|
||||
assert_unsigned(uint64_t);
|
||||
|
||||
assert_signed(intptr_t);
|
||||
assert_unsigned(uintptr_t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user