https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67777
Bug ID: 67777 Summary: unsigned wchar_t and signed wchar_t should cause compiler errors but do not. Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: TrevorJamesHickey at gmail dot com Target Milestone: --- Is the following program valid C++? void f(unsigned wchar_t){} int main(){} It compiles without errors. The standard specifies that: "signed or unsigned can be combined with char, long, short, or int." wchar_t is a distinct type, but the standard makes no mention of it being able to be qualified with signed or unsigned. "Type wchar_t shall have the same size, signedness, and alignment requirements (3.11) as one of the other integral types, called its underlying type." Why can we add signed/unsigned qualifiers to wchar_t? Is this by design? Can I get a warning about this?