The C++ grammar allows you to specify an attribute list on an anonymous bit-field, but we were not properly parsing that case. This would lead to a rejects-valid diagnostic with code like:
struct A { int x, [[]] : 0; };
This patch addresses it by optionally parsing an attribute specifier in the case the identifier is elided. This fixes PR46562.
Please mention that this is a proposed bugfix, not the standard grammar.