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

            Bug ID: 103337
           Summary: rejects-valid brace elision inside designated
                    initializer
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

struct op_t {
  struct put_t {
    int x;
  } put;
};

op_t x{0};       // OK
op_t y{.put=0};  // error: 'op_t::put_t' has no non-static data member named
'put'

GCC rejects the second initializer, but Clang and MSVC accept.

Doesn't appear to be a regression.

Reply via email to