What actually belongs to the "character type" in C11 — besides char of course?
To be more precise, the special exceptions for the character type (for example that any object can be accessed by an lvalue expression of character type — see §6.5/7 in C11 standard), to which concrete types do they apply? They seem to apply to uint8_t and int8_t from stdint.h, but is this guaranteed? On the other hand gcc doesn't regard char16_t from uchar.h as a "character type".
Only char, signed char and unsigned char1.
The types uint8_t, int8_t, char16_t, or any type in the form intN_t or charN_t, may or may not be synonyms for a character type.
1(Quoted from: ISO/IEC 9899:201x 6.2.5 Types 15)
The three types char, signed char, and unsigned char are collectively called the character types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With