arocc icon indicating copy to clipboard operation
arocc copied to clipboard

char8_t should be a distinct type

Open ehaas opened this issue 1 year ago • 1 comments

Not sure how I missed this one but char8_t is a distinct type that is not the same as char, signed char, or unsigned char: https://godbolt.org/z/zEe9jcxqr - currently we just define it as a typedef name for unsigned char. Should be done after #809 to minimize conflicts.

ehaas avatar Dec 30 '24 06:12 ehaas

In C23 char8_t is a typedef in uchar.h, char8_t as a separate type is a C++ extension that clang allows in C but gcc doesn't. char8_t needs to be either removed or made a separate type that is not enabled by default in C23.

Vexu avatar Jun 14 '25 16:06 Vexu