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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
      Known to work|                            |4.9.4
            Summary|ICE with generic lambda     |[5/6/7 Regression] ICE with
                   |expression                  |generic lambda expression
      Known to fail|                            |5.4.0, 6.3.0, 7.0

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
As 4.9.0 reject the code, I mark that as regression:

pr79640.cpp: In instantiation of ‘bar()::<lambda(auto:1)> [with auto:1 = int;
int <anonymous> = 1]’:
pr79640.cpp:3:6:   required from ‘void foo(F) [with F = bar() [with int
<anonymous> = 1]::<lambda(auto:1)>]’
pr79640.cpp:9:31:   required from ‘void bar() [with int <anonymous> = 1]’
pr79640.cpp:12:21:   required from here
pr79640.cpp:9:25: error: ‘i’ was not declared in this scope
   foo([] (auto) { sizeof(i); });
                         ^

Reply via email to