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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r12-8258:

commit 65735d21ac410463126114c572999682f987972c
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Apr 21 17:24:07 2022 -0400

    c++: generic lambda fn parm pack [PR104624]


The patch may be just:

--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -4375,6 +4375,7 @@ check_for_bare_parameter_packs (tree t, location_t loc /*
= UNKNOWN_LOCATION */)
    tree pack = TREE_VALUE (parameter_packs);
    if (is_capture_proxy (pack)
        || (TREE_CODE (pack) == PARM_DECL
+       && DECL_CONTEXT (pack)
        && DECL_CONTEXT (DECL_CONTEXT (pack)) == lam))
      break;
       }

Reply via email to