Does c/c++ define the result of signed integer division: negative extreme divided by minus 1 (INT_MIN/-1)

Viewed 100

What does C or C++ standards say about signed integer division for this special case, is it defined and in what way?

INT_MIN / -1      (0x8000_0000 / 0xFFFF_FFFF)

The mathematics result would be the positive value 0x8000_0000 which is not representable in 32 bit signed 2-complement.

0 Answers
Related