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

            Bug ID: 96887
           Summary: Excessive error output with member initializer list
                    and array
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

struct A {
  A(char);
};

class B {
  const A ary[64];
  B (const A a[]) : ary{a} { }
};

generates 1 + 64 error messages:

array3.C:7:21: error: could not convert ‘<brace-enclosed initializer list>()’
from ‘<brace-enclosed initializer list>’ to ‘const A’
[...]

each for every element of ary.  We should only say that there's no viable
conversion from 'const A *' to 'const A'

Reply via email to