https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96473

            Bug ID: 96473
           Summary: Very weird error message for invalid `wchar_t`
                    declaration
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

unsigned wchar_t x;

This program results in this rather odd error message :

<source>:1:1: error: 'unsigned' specified with 'typeof'
  159 | unsigned wchar_t x;
      | ^~~~~~~~

This is of course a legal diagnostic, but the wording seems rather out of place
when (in my humble opinion) it instead should be something like "unsigned and
signed may not be used with wchar_t".

Reply via email to