https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01108.html
PR c++/84804
* name-lookup.c (do_pushtag): Permit lambdas to be pushed into
complete classes.
PR c++/84804
* g++.dg/lookup/pr84804.C: New.
From-SVN: r258722
+2018-03-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84804
+ * name-lookup.c (do_pushtag): Permit lambdas to be pushed into
+ complete classes.
+
2018-03-21 Martin Sebor <msebor@redhat.com>
PR c++/84850
if (b->kind == sk_class)
{
- if (!TYPE_BEING_DEFINED (current_class_type))
+ if (!TYPE_BEING_DEFINED (current_class_type)
+ && !LAMBDA_TYPE_P (type))
return error_mark_node;
if (!PROCESSING_REAL_TEMPLATE_DECL_P ())
+2018-03-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84804
+ * g++.dg/lookup/pr84804.C: New.
+
2018-03-21 Martin Sebor <msebor@redhat.com>
PR c++/84850
--- /dev/null
+// { dg-do compile { target c++11 } }
+// PR c++/84804 ICE instantiating friend with default arg containing a lambda
+template<int> struct A
+{
+ // Note, instantiation injects this into ::, so there can only be one!
+ friend void foo(int i = []{ return 0;}()) {}
+};
+
+void bar()
+{
+ A<0> x;
+}