https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80415
Bug ID: 80415 Summary: [7 Regression] bogus "invalid initialization of reference" error Product: gcc Version: 7.0.1 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- LLVM trunk doesn't build anymore with gcc-7: % cat Arg.ii struct A { A(int, int, const int (&)[0] = {}); }; A fn1() { return {0, 0}; } % g++ -c Arg.ii Arg.ii: In function ‘A fn1()’: Arg.ii:4:23: error: invalid initialization of reference of type ‘const int (&)[0]’ from expression of type ‘const int [0]’ A fn1() { return {0, 0}; } ^ Arg.ii:2:3: note: in passing argument 3 of ‘A::A(int, int, const int (&)[0])’ A(int, int, const int (&)[0] = {}); ^