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

            Bug ID: 121171
           Summary: Improve diagnostic for parenthesized bit-field names
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luigighiron at gmail dot com
  Target Milestone: ---

The following program demonstrates the misleading diagnostic generated by GCC
when parenthesizing a bit-field name:

struct S{
    int(x):10;
};
int main(){}

The error message generated is "bit-field 'x' has non-integral type 'int'",
which doesn't give any indication of the issue and strangely says that the type
int is not integral.

Reply via email to