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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:9cd7c32549fa334885b716fe98b674f6447fa7c0

commit r11-6942-g9cd7c32549fa334885b716fe98b674f6447fa7c0
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Jan 27 00:51:01 2021 -0500

    c++: Dependent using enum [PR97874]

    The handling of dependent scopes and unsuitable scopes in lookup_using_decl
    was a bit convoluted; I tweaked it for a while and then eventually
    reorganized much of the function to hopefully be clearer.  Along the way I
    noticed a couple of ways we were mishandling inherited constructors.

    The local binding for a dependent using is the USING_DECL.

    Implement instantiation of a dependent USING_DECL at function scope.

    gcc/cp/ChangeLog:

            PR c++/97874
            * name-lookup.c (lookup_using_decl): Clean up handling
            of dependency and inherited constructors.
            (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
            * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.

    gcc/testsuite/ChangeLog:

            PR c++/97874
            * g++.dg/lookup/using4.C: No error in C++20.
            * g++.dg/cpp0x/decltype37.C: Adjust message.
            * g++.dg/template/crash75.C: Adjust message.
            * g++.dg/template/crash76.C: Adjust message.
            * g++.dg/cpp0x/inh-ctor36.C: New test.
            * g++.dg/cpp1z/inh-ctor39.C: New test.
            * g++.dg/cpp2a/using-enum-7.C: New test.

Reply via email to