This is a compiler bug.
Although getting impossible results for undefined behaviour is a valid consequence, there is actually no undefined behaviour in your code. What’s happening is that the compiler thinks the behaviour is undefined, and optimises accordingly.
If c is defined as int8_t, and int8_t promotes to int, then c-- is supposed to perform the subtraction c - 1 in int arithmetic and convert the result back to int8_t. The subtraction in int does not overflow, and converting out-of-range integral values to another integral type is valid. If the destination type is signed, the result is implementation-defined, but it must be a valid value for the destination type. (And if the destination type is unsigned, the result is well-defined, but that does not apply here.)