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

            Bug ID: 108333
           Summary: [10.3/10.4/11/12/13/trunk Regression] The behavior of
                    direct-non-list-initialized is not correct, parsing
                    error on valid code
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yronglin777 at gmail dot com
  Target Milestone: ---

GCC parsing error on valid code:

Compiler Explorer: https://godbolt.org/z/K6edrdTG5 (Thanks Nikolas Klauser)

```
struct NonCopyable {
  NonCopyable(int) {}
  NonCopyable(const NonCopyable&) = delete;
};

struct S {
  S(int i) : val(NonCopyable{1}) {}

  [[no_unique_address]] NonCopyable val;
};

struct T {
  T(int i) : val(NonCopyable{1}) {}

  NonCopyable val;
};

```

This code accept by GCC[9/10.1/10.2], clang and MSVC, but compile failed with
GCC[10.3/10.4/11/12/13/trunk], seems a regression.

Reply via email to