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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:37d2b98100cefcb9d312d379473c12aa6d61fc62

commit r12-174-g37d2b98100cefcb9d312d379473c12aa6d61fc62
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Apr 27 14:18:25 2021 -0400

    c++: Fix Bases(args...)... base initialization [PR88580]

    When substituting into the arguments of a base initializer pack
    expansion, tsubst_initializer_list uses a dummy EXPR_PACK_EXPANSION
    in order to expand an initializer such as Bases(args)... into
    Bases#{0}(args#{0}) and so on.  But when an argument inside the base
    initializer is itself a pack expansion, as in Bases(args...)..., the
    argument is already an EXPR_PACK_EXPANSION so we don't need to wrap it.
    It's also independent from the outer expansion of Bases, so we need to
    "multiplicatively" append the expansion of args... onto the argument
    list of each expanded base.

    gcc/cp/ChangeLog:

            PR c++/88580
            * pt.c (tsubst_initializer_list): Correctly handle the case
            where an argument inside a base initializer pack expansion is
            itself a pack expansion.

    gcc/testsuite/ChangeLog:

            PR c++/88580
            * g++.dg/cpp0x/variadic182.C: New test.

Reply via email to