I am using stdint.h to name integers of a specific size and to let the compiler pick the fastest size for fastest program speed. For example
Code:
uint_fast16_t x;
uint_fast32_t y;
INT_MAX may no longer be correct. I looked in limits.h but did not find the name
uint_fast_16_t and subsequently the max int value as it might really be a 32 or 64 bit integer.
Is there a DEFINE or macro somewhere that specifies the size of
uint_fast16_t at compile time?
If not, then I presume the only I must do something like:
Code:
this_size = sizeof( x );
followed by a couple of IF statements to declare/set a maximum value.