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

            Bug ID: 95808
           Summary: Can mismatch non-array new/delete with array
                    new/delete during constant evaluation
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/ZHiKmm.
```C++
constexpr void f()
{
    delete[] new int;
    delete new int[1];
}
constexpr int x{([]() consteval { f(); }(), 0)};
```

Reply via email to