Is casting uint8_t to signed int at least sometimes incorrect?
问题 While reading the answer to the following question Getting a buffer into a stringstream in hex representation: I did not understand why there is a necessity to cast uint8_t to unsigned (or, as written in comments, even to unsigned char before that), while casting just to int is incorrect. As I understand, no conversions at all would lead to interpreting uint8_t as an underlying type which can (must?) be some of 3 char variations and thus printing it as a character. But what's wrong with