Although char doesn't necessarily have to be 8-bits long, that's not the problem here. You are converting from signed char
to unsigned (uint8_t
), that's the reason for the error.
This:
const int8_t foo[] = {
'\xf2'
};
will compile fine.