When computing ABS_FOR_PRINTING(-9223372036854775808), we hit undefined behavior:
/home/eyalroz/src/mine/printf/test/../src/printf/printf.c:1418:35: runtime error: negation of
-9223372036854775808 cannot be represented in type 'printf_signed_value_t' (aka 'long long');
cast to an unsigned type to negate this value to itself.
we need to change the ABS_FOR_PRINTING() logic to avoid undefined behavior... without changing "real" behavior and hopefully without complicating the code much.
When computing
ABS_FOR_PRINTING(-9223372036854775808), we hit undefined behavior:we need to change the
ABS_FOR_PRINTING()logic to avoid undefined behavior... without changing "real" behavior and hopefully without complicating the code much.