Re:A Special Kind of Hell: intmax_t in C and C++
by jcelerier on Saturday December 05, 2020 @03:58PM
(#25318282)
technically,
int x = x;
compiles, but is UB - you can turn it into a compile error with `-Werror=uninitialized` in decent compilers.
Re:A Special Kind of Hell: intmax_t in C and C++
by SAI_Peregrinus on Saturday December 05, 2020 @03:57PM
(#25318271)
It should be
intmax_t val = imaxabs(original);
for the snippet to make any sense.
intmax_t val = imaxabs(val);
This is the first time `val` is defined in the block, so wouldn’t this raise a C compiler compilation error? If not, then I don’t understand the effect of this line.