Hi! These 2 PRs were fixed with r256964 and stay fixed even with r256965. So I've just committed the testcase to the trunk and am going to close them as fixed.
2018-01-23 Jakub Jelinek <ja...@redhat.com> PR c++/82882 PR c++/83978 * g++.dg/cpp0x/pr82882.C: New test. * g++.dg/cpp0x/pr83978.C: New test. --- gcc/testsuite/g++.dg/cpp0x/pr82882.C.jj 2018-01-23 15:01:19.781297360 +0100 +++ gcc/testsuite/g++.dg/cpp0x/pr82882.C 2018-01-23 15:00:41.739297731 +0100 @@ -0,0 +1,15 @@ +// PR c++/82882 +// { dg-do compile { target c++11 } } + +template <typename> +void +foo () +{ + auto v = [] { enum { E, F }; }; +} + +void +bar () +{ + foo<int> (); +} --- gcc/testsuite/g++.dg/cpp0x/pr83978.C.jj 2018-01-23 15:01:30.086297256 +0100 +++ gcc/testsuite/g++.dg/cpp0x/pr83978.C 2018-01-23 15:00:54.721297609 +0100 @@ -0,0 +1,6 @@ +// PR c++/83978 +// { dg-do compile { target c++11 } } + +template <int N> +struct A { A () { auto a = [] { enum E { F }; }; } }; +A<0> *p = new A<0> (); Jakub