[Bug c++/89648] [9 Regression] rejects-valid error starting with r268850

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Mar 10 12:54:00 GMT 2019


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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
pr89648.C: In instantiation of ‘void quux(int, int*, D, int*, int, int, T, U,
V, H<W ...>) [with T = long int; U = int; V = J<int, int>; long unsigned int
...W = {0, 1}; H<W ...> = F<long unsigned int, 0, 1>]’:
pr89648.C:26:60:   required from here
pr89648.C:20:29: error: redeclaration of ‘const J<int, int> y’
   20 |   x.foo ([=] { bar (qux <W>(y)...); });
      |                             ^
pr89648.C:20:29: note: ‘const J<int, int> y’ previously declared here
pr89648.C:20:10: error: designator order for field ‘quux(int, int*, D, int*,
int, int, T, U, V, H<W ...>) [with T = long int; U = int; V = J<int, int>; long
unsigned int ...W = {0, 1}; H<W ...> = F<long unsigned int, 0,
1>]::<lambda()>::<y capture>’ does not match declaration order in ‘quux(int,
int*, D, int*, int, int, T, U, V, H<W ...>) [with T = long int; U = int; V =
J<int, int>; long unsigned int ...W = {0, 1}; H<W ...> = F<long unsigned int,
0, 1>]::<lambda()>’
   20 |   x.foo ([=] { bar (qux <W>(y)...); });
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pr89648.C:15:39: error: ‘void D::foo(T) [with T = quux(int, int*, D, int*, int,
int, T, U, V, H<W ...>) [with T = long int; U = int; V = J<int, int>; long
unsigned int ...W = {0, 1}; H<W ...> = F<long unsigned int, 0,
1>]::<lambda()>]’, declared using local type ‘quux(int, int*, D, int*, int,
int, T, U, V, H<W ...>) [with T = long int; U = int; V = J<int, int>; long
unsigned int ...W = {0, 1}; H<W ...> = F<long unsigned int, 0,
1>]::<lambda()>’, is used but never defined [-fpermissive]
   15 | struct D { template <typename T> void foo (T) {} };
      |                                       ^~~


More information about the Gcc-bugs mailing list