https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85951
Bug ID: 85951 Summary: make_signed and make_unsigned are incorrect for wchar_t, char16_t, and char32_t Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: kretz at kde dot org Target Milestone: --- make_(un)signed_t of char16_t, char32_t, or wchar_t should never be char16_t/char32_t/wchar_t, just like it is the case for make_signed_t<char> (which is signed char). According to http://eel.is/c++draft/basic.fundamental#2 and #3 char16_t, char32_t, and wchar32_t are neither _signed integer types_ nor _unsigned integer types_. Therefore, the third outcome in http://eel.is/c++draft/meta.trans.sign applies: "type names the (un)signed integer type with smallest rank for which sizeof(T) == sizeof(type), with the same cv-qualifiers as T". cf. https://godbolt.org/g/aG4CnD